Bug#555753: FTBFS with binutils-gold

2011-11-28 Thread Paul Merrill
Source: moon-lander
Followup-For: Bug #555753

Dear Maintainer,

This package failed to build with gold/ld because it was missing a link
to libm. The attached Makefile links -lm and fixes the build.

Cheers,
Paul Merrill
# Makefile for test program for game_libs - lunar lander
CFLAGS+=-Wall `sdl-config --cflags` 
CC=gcc

LIBS=SDL_image `sdl-config --libs` -lm

C_FILES=moon_lander.c game_lib.c DT_drawtext.c
OBJ_FILES=moon_lander.o game_lib.o DT_drawtext.o 
OUT_FILE=moon-lander

all: game_lib

game_lib: $(OBJ_FILES)
	$(CC) $(CFLAGS) -o $(OUT_FILE) $(OBJ_FILES) -l$(LIBS) -lSDL_mixer

moon_lander.o: moon_lander.c
	$(CC) $(CFLAGS) -c -o $@ $^

game_lib.o: game_lib.c
	$(CC) $(CFLAGS) -c -o $@ $^

DT_drawtext.o: DT_drawtext.c
	$(CC) $(CFLAGS) -c -o $@ $^

clean: 
	rm -f $(OUT_FILE) $(OBJ_FILES)

install: 
	./install.sh




Bug#554799: FTBFS with binutils-gold

2011-11-26 Thread Paul Merrill
Source: heroes
Followup-For: Bug #554799

Dear Maintainer,

The linking problem comes from the LIBS variable being overwritten due
to an M4 programming bug.  Here is a patch that fixes the bug.  With
this, the package should build properly with gold ld.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/aclocal.m4 b/aclocal.m4
index 2db2d3e..431d857 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1523,7 +1523,7 @@ if test ${with_sdl_mixer-yes} != no; then
   # so that AC_caolan_CHECK_PACKAGE can find SDL_mixer.h in the same directory.
   tmp_CPPFLAGS=$CPPFLAGS
   CPPFLAGS=$SDL_CFLAGS $CPPFLAGS
-  tmp_LIBS=$CPPLIBS
+  tmp_LIBS=$LIBS
   LIBS=$SDL_LIBS $LIBS
 
   AC_caolan_CHECK_PACKAGE([SDL_mixer], [Mix_OpenAudio],