From 6463d744a94d623fa271bb8a48b09996b5d8e7cd Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Tue, 31 May 2016 19:38:08 +0100 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 link against -lc and -Wl,--as-needed, this way we pull the required fortified functions from the internal libc_nonshared.a, but do not link against the shared library because we do 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 eadb336..ecf5bf8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,7 +6,7 @@ CFLAGS ?= -g -fomit-frame-pointer -O2 CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC SO_CFLAGS=-shared $(CFLAGS) L_CFLAGS=$(CFLAGS) -LINK_FLAGS= +LINK_FLAGS=-Wl,--as-needed -lgcc -lc LINK_FLAGS+=$(LDFLAGS) soname=libaio.so.1 -- 2.30.2