From: Philippe Coval Date: Mon, 8 Dec 2014 15:00:20 +0000 (+0100) Subject: optflags: set _FORTIFY_SOURCE for preproc X-Git-Tag: accepted/tizen/common/20150403.125416~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Frpm.git;a=commitdiff_plain;h=e85af05c326509a171ea7551b6508a851ebc8bc8 optflags: set _FORTIFY_SOURCE for preproc Without it will fail if optflags are not overridden and raise an error like : configure: CFLAGS error: CFLAGS may only be used to specify C compiler flags, not macro definitions. Use CPPFLAGS for: -D_FORTIFY_SOURCE=2 configure: error: Can not continue. Fix errors mentioned immediately above this line. error: Bad exit status from /var/tmp/rpm-tmp.AoOYbS (%build) More details at : https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Preprocessor-Options.html#index-Wp-986 Change-Id: I49c8545a0526a1922905ef55de3a59edf9036068 Signed-off-by: Philippe Coval --- diff --git a/rpmrc.in b/rpmrc.in index 30481b2..1962600 100644 --- a/rpmrc.in +++ b/rpmrc.in @@ -12,16 +12,16 @@ # "fat" binary with both archs, for Darwin optflags: fat -O2 -g -arch i386 -arch ppc -optflags: i386 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -optflags: i486 -O2 -g -m32 -march=i486 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -optflags: i686 -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: i386 -O2 -g -m32 -march=i486 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: i486 -O2 -g -m32 -march=i486 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: i586 -O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: i686 -O2 -g -m32 -march=i686 -mtune=i686 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: pentium3 -O2 -g -m32 -march=pentium3 optflags: pentium4 -O2 -g -m32 -march=pentium4 optflags: athlon -O2 -g -m32 -march=athlon optflags: geode -Os -g -m32 -march=geode -optflags: ia64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -optflags: x86_64 -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: ia64 -O2 -g -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: x86_64 -O2 -g -m64 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: amd64 -O2 -g optflags: ia32e -O2 -g @@ -41,14 +41,14 @@ optflags: sparc64v -O2 -g -m64 -mtune=niagara optflags: m68k -O2 -g -fomit-frame-pointer -optflags: ppc -O2 -g -m32 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: ppc -O2 -g -m32 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: ppc8260 -O2 -g -m32 optflags: ppc8560 -O2 -g -m32 optflags: ppc32dy4 -O2 -g -m32 optflags: ppciseries -O2 -g -m32 optflags: ppcpseries -O2 -g -m32 -optflags: ppc64 -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: ppc64 -O2 -g -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: ppc64p7 -O3 -mtune=power7 -mcpu=power7 -g -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: parisc -O2 -g -mpa-risc-1-0 optflags: hppa -O2 -g -mpa-risc-1-0 @@ -78,8 +78,8 @@ optflags: atariclone -O2 -g -fomit-frame-pointer optflags: milan -O2 -g -fomit-frame-pointer optflags: hades -O2 -g -fomit-frame-pointer -optflags: s390 -O2 -g -m31 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -optflags: s390x -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: s390 -O2 -g -m31 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables +optflags: s390x -O2 -g -m64 -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables optflags: sh3 -O2 -g optflags: sh4 -O2 -g -mieee