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>
# 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.
$(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
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 \