]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
squid: Link against libatomic on ARM
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 May 2019 21:54:11 +0000 (22:54 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 7 May 2019 22:54:32 +0000 (23:54 +0100)
This package failed to build on ARM because atomic functions
are being emulated on ARM32 and the required library was not
linked.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/squid

index 0115cad82ad1c9743c2ce92daf48829082513a6f..780f16548a90381ec232de9aae915b5aed25de9e 100644 (file)
--- a/lfs/squid
+++ b/lfs/squid
@@ -34,6 +34,10 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 
 CXXFLAGS+= -Wno-error=format-truncation
 
 
 CXXFLAGS+= -Wno-error=format-truncation
 
+ifeq "$(BUILD_ARCH)" "armv5tel"
+       LDFLAGS += -latomic
+endif
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -77,7 +81,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && autoreconf -vfi
        cd $(DIR_APP)/libltdl && autoreconf -vfi
 
        cd $(DIR_APP) && autoreconf -vfi
        cd $(DIR_APP)/libltdl && autoreconf -vfi
 
-       cd $(DIR_APP) && CXXFLAGS="$(CXXFLAGS)" ./configure \
+       cd $(DIR_APP) && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
+               LDFLAGS="$(LDFLAGS)" ./configure \
                --prefix=/usr \
                --sysconfdir=/etc/squid \
                --datadir=/usr/lib/squid \
                --prefix=/usr \
                --sysconfdir=/etc/squid \
                --datadir=/usr/lib/squid \