File: Wl-as-needed

package info (click to toggle)
atom4 4.1-9
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 836 kB
  • ctags: 1,222
  • sloc: cpp: 4,451; makefile: 46; perl: 6
file content (33 lines) | stat: -rw-r--r-- 1,298 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: List lib dependencies in the right order for -Wl,--as-needed
 With -Wl,--as-needed, libraries which don't provide any symbols that are
 referenced are dropped from the final linkage, which means libraries must
 be listed on the commandline after what depends on them in order to avoid a
 build failure.
Author: Steve Langasek <steve.langasek@ubuntu.com>

Index: atom4-4.1/Construct
===================================================================
--- atom4-4.1.orig/Construct
+++ atom4-4.1/Construct
@@ -88,7 +88,7 @@
 # Local configuration
 $INCPATH  = "$INCDIR:$PROGLIBPATH/include";
 $LIBPATH  = "$PROGLIBPATH/lib:$LIBDIR:$X11LIBPATH";
-$LIBS     = "$PROGLIB $NCURSESLIB $X11LIB -latom4 -lxatom4";
+$LIBS     = "$PROGLIB -lxatom4 -latom4 $NCURSESLIB $X11LIB";
 $LIBS    .= " -pg" if $PROFILE;
 
 $CONS = new cons(
Index: atom4-4.1/SConstruct
===================================================================
--- atom4-4.1.orig/SConstruct
+++ atom4-4.1/SConstruct
@@ -57,7 +57,7 @@
 # Local configuration
 incpath  = [ incdir, proglibpath + '/include' ]
 libpath  = [ proglibpath + '/lib', libdir, x11libpath ]
-libs     = [ proglib, ncurseslib, x11lib, '-latom4', '-lxatom4' ];
+libs     = [ proglib, '-lxatom4', '-latom4', ncurseslib, x11lib ];
 if profile:
 	libs += '-pg'