From: Guillem Jover Date: Tue, 31 May 2016 18:38:08 +0000 (+0100) Subject: Link against libgcc and libc to avoid unresolved symbols X-Git-Tag: archive/raspbian/0.3.112-13+rpi1~1^2^2^2^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6463d744a94d623fa271bb8a48b09996b5d8e7cd;p=libaio.git 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 --- 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