Separate IPA_LDFLAGS for in-process agent 82/224582/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix tizen_6.5 tizen_7.0 tizen_7.0_hotfix accepted/tizen/6.0/unified/20201030.104552 accepted/tizen/6.0/unified/hotfix/20201103.000705 accepted/tizen/6.5/unified/20211029.012911 accepted/tizen/7.0/unified/20221110.063120 accepted/tizen/7.0/unified/hotfix/20221116.110809 accepted/tizen/unified/20200212.125733 submit/tizen/20200212.010646 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 submit/tizen_6.5/20211028.163401 tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release
authorSeungha Son <seungha.son@samsung.com>
Tue, 11 Feb 2020 23:28:43 +0000 (08:28 +0900)
committerSeungha Son <seungha.son@samsung.com>
Tue, 11 Feb 2020 23:28:43 +0000 (08:28 +0900)
 When adjust previous patch what is for ASLR security rules,
 LDFLAGS has been applied to both excutable and DSO.
 This patch fix the build problem by separating LDFLAGS.

 Related patch :
   https://review.tizen.org/gerrit/#/c/platform/upstream/gdb/+/224509/

Change-Id: If2923c5dc681dba70caa7648695db63c54b88961
Signed-off-by: Seungha Son <seungha.son@samsung.com>
gdb/gdbserver/Makefile.in
packaging/gdb.spec

index f5fc550..b48da6d 100644 (file)
@@ -149,6 +149,7 @@ INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
 # when running make.
 LDFLAGS = @LDFLAGS@
 INTERNAL_LDFLAGS = $(LDFLAGS) @RDYNAMIC@
+IPA_INTERNAL_LDFLAGS = $(IPA_LDFLAGS) @RDYNAMIC@
 
 # All source files that go into linking GDB remote server.
 
@@ -433,7 +434,7 @@ IPA_LIB = libinproctrace.so
 $(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
        $(SILENCE) rm -f $(IPA_LIB)
        $(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
-               -Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
+               -Wl,--no-undefined $(INTERNAL_CFLAGS) $(IPA_INTERNAL_LDFLAGS) \
                -o $(IPA_LIB) ${IPA_OBJS} -ldl -pthread
 
 # Put the proper machine-specific files first, so M-. on a machine
index 0250c2f..7f1f69f 100644 (file)
@@ -56,6 +56,8 @@ rm -f gdb/doc/*.info-*
 CFLAGS+=" -fPIE"
 CXXFLAGS+=" -fPIE"
 LDFLAGS+=" -pie"
+#If you want to add a new LDFLAGS to IPA, add it to `IPA_LDFLAGS` rather than` LDFLAGS`.
+IPA_LDFLAGS+=""
 
 %configure                                             \
        --with-gdb-datadir=%{_datadir}/gdb              \