From f377f6c0bcb081bd3ddea7a850aa9169493ebce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20Beauchesne?= Date: Thu, 25 Aug 2005 22:51:48 +0000 Subject: factor out common compile flags and build with -D_FORTIFY_SOURCE=2 --- macros.in | 3 ++ rpmrc.in | 102 +++++++++++++++++++++++++++++++------------------------------- 2 files changed, 54 insertions(+), 51 deletions(-) diff --git a/macros.in b/macros.in index 06a52b6..7294a4c 100644 --- a/macros.in +++ b/macros.in @@ -65,6 +65,9 @@ %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon k6 +# common compilation flags +%__common_cflags -O2 %{debugcflags} -pipe -Wp,-D_FORTIFY_SOURCE=2 + #============================================================================== # ---- Optional rpmrc macros. # Macros that are initialized as a side effect of rpmrc and/or spec diff --git a/rpmrc.in b/rpmrc.in index ec742a7..15f976b 100644 --- a/rpmrc.in +++ b/rpmrc.in @@ -5,59 +5,59 @@ ############################################################# # Values for RPM_OPT_FLAGS for various platforms -optflags: i386 -O2 -fomit-frame-pointer -pipe -march=i386 %{debugcflags} -optflags: i486 -O2 -fomit-frame-pointer -pipe -march=i486 %{debugcflags} -optflags: k6 -O2 -fomit-frame-pointer -pipe -march=k6 %{debugcflags} -optflags: i586 -O2 -fomit-frame-pointer -pipe -march=i586 -mtune=pentiumpro %{debugcflags} -optflags: i686 -O2 -fomit-frame-pointer -pipe -march=i686 %{debugcflags} -optflags: athlon -O2 -fomit-frame-pointer -pipe -march=athlon %{debugcflags} -optflags: ia64 -O2 -pipe %{debugcflags} -optflags: x86_64 -O2 -pipe %{debugcflags} -optflags: amd64 -O2 -pipe %{debugcflags} -optflags: ia32e -O2 -pipe %{debugcflags} +optflags: i386 %{__common_cflags} -fomit-frame-pointer -march=i386 +optflags: i486 %{__common_cflags} -fomit-frame-pointer -march=i486 +optflags: k6 %{__common_cflags} -fomit-frame-pointer -march=k6 +optflags: i586 %{__common_cflags} -fomit-frame-pointer -march=i586 -mtune=pentiumpro +optflags: i686 %{__common_cflags} -fomit-frame-pointer -march=i686 +optflags: athlon %{__common_cflags} -fomit-frame-pointer -march=athlon +optflags: ia64 %{__common_cflags} +optflags: x86_64 %{__common_cflags} +optflags: amd64 %{__common_cflags} +optflags: ia32e %{__common_cflags} # XXX Please note that -mieee has been added in rpm-3.0.5. -optflags: alpha -O2 -mieee -mcpu=ev5 -pipe %{debugcflags} -optflags: alphaev5 -O2 -mieee -mcpu=ev5 -pipe %{debugcflags} -optflags: alphaev56 -O2 -mieee -mcpu=ev56 -pipe %{debugcflags} -optflags: alphapca56 -O2 -mieee -mcpu=pca56 -pipe %{debugcflags} -optflags: alphaev6 -O2 -mieee -mcpu=ev6 -pipe %{debugcflags} -optflags: alphaev67 -O2 -mieee -mcpu=ev67 -pipe %{debugcflags} - -optflags: sparc -O2 -m32 -mtune=ultrasparc %{debugcflags} -optflags: sparcv9 -O2 -m32 -mcpu=ultrasparc %{debugcflags} -optflags: sparc64 -O2 -m64 -mcpu=ultrasparc %{debugcflags} - -optflags: m68k -O2 %{debugcflags} -fomit-frame-pointer - -optflags: ppc -O2 -fsigned-char -mcpu=750 -mtune=7450 -pipe %{debugcflags} -optflags: ppciseries -O2 %{debugcflags} -fsigned-char -optflags: ppcpseries -O2 %{debugcflags} -fsigned-char -optflags: ppc64 -O2 %{debugcflags} -fsigned-char - -optflags: parisc -O2 %{debugcflags} -mpa-risc-1-0 -optflags: hppa1.0 -O2 %{debugcflags} -mpa-risc-1-0 -optflags: hppa1.1 -O2 %{debugcflags} -mpa-risc-1-0 -optflags: hppa1.2 -O2 %{debugcflags} -mpa-risc-1-0 -optflags: hppa2.0 -O2 %{debugcflags} -mpa-risc-1-0 - -optflags: mips -O2 %{debugcflags} -optflags: mipsel -O2 %{debugcflags} - -optflags: armv3l -O2 %{debugcflags} -fsigned-char -fomit-frame-pointer -march=armv3 -optflags: armv4b -O2 %{debugcflags} -fsigned-char -fomit-frame-pointer -march=armv4 -optflags: armv4l -O2 %{debugcflags} -fsigned-char -fomit-frame-pointer -march=armv4 - -optflags: atarist -O2 %{debugcflags} -fomit-frame-pointer -optflags: atariste -O2 %{debugcflags} -fomit-frame-pointer -optflags: ataritt -O2 %{debugcflags} -fomit-frame-pointer -optflags: falcon -O2 %{debugcflags} -fomit-frame-pointer -optflags: atariclone -O2 %{debugcflags} -fomit-frame-pointer -optflags: milan -O2 %{debugcflags} -fomit-frame-pointer -optflags: hades -O2 %{debugcflags} -fomit-frame-pointer - -optflags: s390 -O2 %{debugcflags} -optflags: s390x -O2 %{debugcflags} +optflags: alpha %{__common_cflags} -mieee -mcpu=ev5 +optflags: alphaev5 %{__common_cflags} -mieee -mcpu=ev5 +optflags: alphaev56 %{__common_cflags} -mieee -mcpu=ev56 +optflags: alphapca56 %{__common_cflags} -mieee -mcpu=pca56 +optflags: alphaev6 %{__common_cflags} -mieee -mcpu=ev6 +optflags: alphaev67 %{__common_cflags} -mieee -mcpu=ev67 + +optflags: sparc %{__common_cflags} -m32 -mtune=ultrasparc +optflags: sparcv9 %{__common_cflags} -m32 -mcpu=ultrasparc +optflags: sparc64 %{__common_cflags} -m64 -mcpu=ultrasparc + +optflags: m68k %{__common_cflags} -fomit-frame-pointer + +optflags: ppc %{__common_cflags} -fsigned-char -mcpu=750 -mtune=7450 +optflags: ppciseries %{__common_cflags} -fsigned-char +optflags: ppcpseries %{__common_cflags} -fsigned-char +optflags: ppc64 %{__common_cflags} -fsigned-char + +optflags: parisc %{__common_cflags} -mpa-risc-1-0 +optflags: hppa1.0 %{__common_cflags} -mpa-risc-1-0 +optflags: hppa1.1 %{__common_cflags} -mpa-risc-1-0 +optflags: hppa1.2 %{__common_cflags} -mpa-risc-1-0 +optflags: hppa2.0 %{__common_cflags} -mpa-risc-1-0 + +optflags: mips %{__common_cflags} +optflags: mipsel %{__common_cflags} + +optflags: armv3l %{__common_cflags} -fsigned-char -fomit-frame-pointer -march=armv3 +optflags: armv4b %{__common_cflags} -fsigned-char -fomit-frame-pointer -march=armv4 +optflags: armv4l %{__common_cflags} -fsigned-char -fomit-frame-pointer -march=armv4 + +optflags: atarist %{__common_cflags} -fomit-frame-pointer +optflags: atariste %{__common_cflags} -fomit-frame-pointer +optflags: ataritt %{__common_cflags} -fomit-frame-pointer +optflags: falcon %{__common_cflags} -fomit-frame-pointer +optflags: atariclone %{__common_cflags} -fomit-frame-pointer +optflags: milan %{__common_cflags} -fomit-frame-pointer +optflags: hades %{__common_cflags} -fomit-frame-pointer + +optflags: s390 %{__common_cflags} +optflags: s390x %{__common_cflags} ############################################################# # Canonical arch names and numbers -- cgit v1.2.1