You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-puzzle/neverball/files/neverball-1.5.4-lm.patch

29 lines
1.3 KiB

Fix link faiure against -lm
x86_64-pc-linux-gnu-gcc -Wall -ansi -pedantic -march=core2 -O2 -pipe -ggdb -o neverball-mapc share/vec3.o share/base_image.o share/solid.o share/binary.o share/base_config.o share/common.o share/fs.o share/fs_png.o share/fs_jpg.o share/dir.o share/array.o share/mapc.o -Wl,-O1 -Wl,--as-needed -ljpeg -lpng15 -lphysfs
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: share/mapc.o: undefined reference to symbol 'acosf@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'acosf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
Gentoo-bug: http://bugs.gentoo.org/464014
diff --git a/Makefile b/Makefile
index 62a87e9..1816707 100644
--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,7 @@ ifdef DARWIN
endif
BASE_LIBS := -ljpeg $(PNG_LIBS) $(FS_LIBS)
+MAPC_LIBS := -lm # only acosf user
ifdef DARWIN
BASE_LIBS += -L/opt/local/lib
@@ -318,7 +319,7 @@ $(PUTT_TARG) : $(PUTT_OBJS)
$(CC) $(ALL_CFLAGS) -o $(PUTT_TARG) $(PUTT_OBJS) $(LDFLAGS) $(ALL_LIBS)
$(MAPC_TARG) : $(MAPC_OBJS)
- $(CC) $(ALL_CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LDFLAGS) $(BASE_LIBS)
+ $(CC) $(ALL_CFLAGS) -o $(MAPC_TARG) $(MAPC_OBJS) $(LDFLAGS) $(MAPC_LIBS) $(BASE_LIBS)
# Work around some extremely helpful sdl-config scripts.