Package: x2x
Version: 1.30-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu raring ubuntu-patch



In Ubuntu, the attached patch was applied to achieve the following:

  * Move libs from AM_LDFLAGS to LIBS to fix linking with --as-needed

This should be fairly self-explanatory.  Putting libs in AM_LDFLAGS
means they end up in the wrong part of the commandline for ld's left
to right object resolution magic when linking with --as-needed. Moving
them to LIBS puts them at the end of the command line and makes it
happy again.

... Adam

-- System Information:
Debian Release: wheezy/sid
  APT prefers raring-updates
  APT policy: (500, 'raring-updates'), (500, 'raring-security'), (500, 'raring')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8.0-2-generic (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru x2x-1.30/debian/changelog x2x-1.30/debian/changelog
diff -Nru x2x-1.30/debian/patches/ld-as-needed.patch x2x-1.30/debian/patches/ld-as-needed.patch
--- x2x-1.30/debian/patches/ld-as-needed.patch	1969-12-31 17:00:00.000000000 -0700
+++ x2x-1.30/debian/patches/ld-as-needed.patch	2013-02-02 05:56:09.000000000 -0700
@@ -0,0 +1,26 @@
+Description: Move libs from AM_LDFLAGS to LIBS to fix linking with --as-needed
+Author: Adam Conrad <[email protected]>
+Forwarded: no
+
+Index: x2x-1.30/Makefile.am
+===================================================================
+--- x2x-1.30.orig/Makefile.am	2013-02-02 05:50:53.000000000 -0700
++++ x2x-1.30/Makefile.am	2013-02-02 05:53:47.745387175 -0700
+@@ -5,7 +5,7 @@
+ #
+ 
+ AM_CFLAGS = $(X11_CFLAGS) -Wall
+-AM_LDFLAGS = $(X11_LIBS)
++LIBS = $(X11_LIBS)
+ 
+ bin_PROGRAMS = x2x
+ 
+@@ -19,7 +19,7 @@
+ if WIN32
+ 
+ AM_CFLAGS += -DWIN_2_X
+-AM_LDFLAGS += -luser32 -lgdi32 # Ugly hack
++LIBS += -luser32 -lgdi32 # Ugly hack
+ x2x_SOURCES += keymap.c winmsg.c x2xwin.rc
+ 
+ .o:.rc
diff -Nru x2x-1.30/debian/patches/series x2x-1.30/debian/patches/series
--- x2x-1.30/debian/patches/series	1969-12-31 17:00:00.000000000 -0700
+++ x2x-1.30/debian/patches/series	2013-02-02 05:50:53.000000000 -0700
@@ -0,0 +1 @@
+ld-as-needed.patch

Reply via email to