From c1b6570ccdbb722fb270ba02e6276a71a7d39c67 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 26 Feb 2019 04:26:21 +0000 Subject: [PATCH] Link against libgcc and libc to avoid unresolved symbols Origin: vendor Bug-Debian: 764509 Forwarded: no Last-Update: 2014-10-09 We need to link agaisnt -lgcc, on at least hppa. We also need to link against -lc, because we are now always using the syscall() libc function. So let's stop passing -nostdlib and -nostartfiles. Note: we used to use -Wl,--as-needed, this way we made sure we pulled the required fortified functions from the internal libc_nonshared.a, but did not link against the shared library because we did not use any of its symbols. Gbp-Pq: Name 01_link_libs.patch --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index b437945..37ae219 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ includedir=$(prefix)/include libdir=$(prefix)/lib CFLAGS ?= -g -fomit-frame-pointer -O2 -CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC +CFLAGS += -Wall -I. -fPIC SO_CFLAGS=-shared $(CFLAGS) L_CFLAGS=$(CFLAGS) LINK_FLAGS= -- 2.30.2