Add -frecord-gcc-switches to the global cflags 32/190832/2
authorMikhail Kashkarov <m.kashkarov@partner.samsung.com>
Fri, 5 Oct 2018 13:55:47 +0000 (16:55 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Tue, 7 Apr 2020 02:51:26 +0000 (11:51 +0900)
Record the command line used to invoke the compiler to the object file that is
being created. Creates .GCC.command.line section for the ELF files that is going
to be stripped into debuginfo by rpm.
Compiler options can be retrieved from debuginfo like this:

readelf -p .GCC.command.line libc-2.24.so.debug

Change-Id: Ib7b4dff734e5d9a06853b2680036a79a6381fe3d

Tizen:Base/_config

index eb469ab..a07833a 100644 (file)
@@ -198,7 +198,7 @@ Substitute: glibc-devel-32bit
 %endif
 
 ########## compilation flags ##########
-%define __global_cflags -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -Wformat-security -fmessage-length=0 -Wl,-z,relro,--as-needed
+%define __global_cflags -O2 -g2 -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -Wformat-security -fmessage-length=0 -frecord-gcc-switches -Wl,-z,relro,--as-needed
 
 Optflags: armv7l %{__global_cflags} --param=ssp-buffer-size=4 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -mthumb -Wp,-D__SOFTFP__ -Wl,-O1 -Wl,--hash-style=gnu -Wa,-mimplicit-it=thumb
 Optflags: aarch64 %{__global_cflags} -feliminate-unused-debug-types -Wformat -march=armv8-a+fp+simd+crc+crypto -mtune=cortex-a57.cortex-a53