smc-tools/smc-tools-1.0.0-ldflags.patch
2018-04-16 14:07:55 +02:00

42 lines
1.8 KiB
Diff

diff -up smc-tools-1.0.0/Makefile.ldflags smc-tools-1.0.0/Makefile
--- smc-tools-1.0.0/Makefile.ldflags 2017-03-31 12:52:46.000000000 +0200
+++ smc-tools-1.0.0/Makefile 2018-01-10 10:04:08.000000000 +0100
@@ -49,6 +51,7 @@ endif
all: smc_run ld_pre_smc.so ld_pre_smc32.so smcss smc_pnet
CFLAGS := -Wall -I include -O3 -g
+LDFLAGS :=
ifeq ($(ARCH),s390x)
MACHINE_OPT32="-m31"
@@ -62,13 +65,13 @@ smc_run: smc_run.in
ld_pre_smc.so: ld_pre_smc.c
${CC} ${CFLAGS} -fPIC -c ld_pre_smc.c
- ${CC} -shared ld_pre_smc.o -ldl -Wl,-z,defs -o ld_pre_smc.so
+ ${CC} ${LDFLAGS} -shared ld_pre_smc.o -ldl -Wl,-z,defs -o ld_pre_smc.so
ld_pre_smc32.so: ld_pre_smc.c
ifeq ($(ARCH64),1)
ifeq ($(STUFF_32BIT),1)
${CC} ${CFLAGS} -fPIC -c ${MACHINE_OPT32} ld_pre_smc.c -o ld_pre_smc32.o
- ${CC} -shared ld_pre_smc32.o ${MACHINE_OPT32} -ldl -o ld_pre_smc32.so
+ ${CC} ${LDFLAGS} -shared ld_pre_smc32.o ${MACHINE_OPT32} -ldl -o ld_pre_smc32.so
else
$(warning "Warning: Skipping 31/32-bit library build because 31/32-bit \
build tools are unavailable. SMC-R will not support 31 and 32 bit TCP \
diff -up smc-tools-1.0.0/Makefile.ldflags smc-tools-1.0.0/Makefile
--- smc-tools-1.0.0/Makefile.ldflags 2018-04-16 14:04:44.000000000 +0200
+++ smc-tools-1.0.0/Makefile 2018-04-16 14:05:06.000000000 +0200
@@ -96,8 +96,8 @@ endif
smc_pnet: smc_pnet.c smc.h
@if [ -e /usr/include/libnl3/netlink/netlink.h ]; then \
- echo ${CC} ${CFLAGS} ${SMC_PNET_CFLAGS} -o $@ $< ${SMC_PNET_LFLAGS}; \
- ${CC} ${CFLAGS} ${SMC_PNET_CFLAGS} -o $@ $< ${SMC_PNET_LFLAGS}; \
+ echo ${CC} ${CFLAGS} ${SMC_PNET_CFLAGS} ${LDFLAGS} -o $@ $< ${SMC_PNET_LFLAGS}; \
+ ${CC} ${CFLAGS} ${SMC_PNET_CFLAGS} ${LDFLAGS} -o $@ $< ${SMC_PNET_LFLAGS}; \
else \
printf "*********************************************\n" >&2; \
printf "* Missing build requirement for: %-45s\n" $@ >&2; \