From: Seungha Son Date: Tue, 11 Feb 2020 23:28:43 +0000 (+0900) Subject: Separate IPA_LDFLAGS for in-process agent X-Git-Tag: submit/tizen/20200212.010646^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75dc8dfc6c02d39c98d0c6d198218ad8bfb79df1;p=platform%2Fupstream%2Fgdb.git Separate IPA_LDFLAGS for in-process agent 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 --- diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index f5fc55034..b48da6dee 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -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 diff --git a/packaging/gdb.spec b/packaging/gdb.spec index 0250c2f27..7f1f69f14 100644 --- a/packaging/gdb.spec +++ b/packaging/gdb.spec @@ -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 \