rename strip_fPIC.sh to strip_non_asm_libtool_args.sh, as it takes on new duties...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 29 Jul 2004 06:43:23 +0000 (06:43 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 29 Jul 2004 06:43:23 +0000 (06:43 +0000)
Makefile.am
src/libFLAC/Makefile.am
src/libFLAC/ia32/Makefile.am
strip_fPIC.sh [deleted file]
strip_non_asm_libtool_args.sh [new file with mode: 0755]

index 84ed4d9..7e68e95 100644 (file)
@@ -45,6 +45,6 @@ EXTRA_DIST = \
        config.rpath \
        depcomp \
        ltmain.sh \
-       strip_fPIC.sh
+       strip_non_asm_libtool_args.sh
 
 AUTOMAKE_OPTIONS = foreign
index 1eb9942..e5833e1 100644 (file)
@@ -45,6 +45,7 @@ endif
 if FLaC__CPU_PPC
 ARCH_SUBDIRS = ppc
 libFLAC_la_LIBADD = ppc/libFLAC-asm.la
+LOCAL_EXTRA_LDFLAGS = "-Wl,-read_only_relocs,warning"
 endif
 endif
 
@@ -60,7 +61,7 @@ EXTRA_DIST = \
        libFLAC.m4
 
 # see 'http://www.gnu.org/software/libtool/manual.html#Versioning' for numbering convention
-libFLAC_la_LDFLAGS = -version-info 5:2:1 -lm
+libFLAC_la_LDFLAGS = -version-info 5:2:1 -lm $(LOCAL_EXTRA_LDFLAGS)
 libFLAC_la_SOURCES = \
        bitbuffer.c \
        bitmath.c \
index c863a99..f2d4db0 100644 (file)
 
 SUFFIXES = .nasm .lo
 
-STRIP_FPIC = sh $(top_srcdir)/strip_fPIC.sh
+STRIP_NON_ASM = sh $(top_srcdir)/strip_non_asm_libtool_args.sh
 
 .nasm.lo:
-       $(LIBTOOL) --mode=compile $(STRIP_FPIC) $(NASM) -f $(OBJ_FORMAT) -d OBJ_FORMAT_$(OBJ_FORMAT) -i$(srcdir)/ $< -o $@
+       $(LIBTOOL) --mode=compile $(STRIP_NON_ASM) $(NASM) -f $(OBJ_FORMAT) -d OBJ_FORMAT_$(OBJ_FORMAT) -i$(srcdir)/ $< -o $@
 
 noinst_LTLIBRARIES = libFLAC-asm.la
 libFLAC_asm_la_SOURCES = \
diff --git a/strip_fPIC.sh b/strip_fPIC.sh
deleted file mode 100755 (executable)
index fdf7de6..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-#
-# libtool assumes that the compiler can handle the -fPIC flag
-# This isn't always true (for example, nasm can't handle it)
-command=""
-while [ $1 ]; do
-       if [ "$1" != "-fPIC" ]; then
-               if [ "$1" != "-DPIC" ]; then
-                       command="$command $1"
-               fi
-       fi
-       shift
-done
-echo $command
-exec $command
diff --git a/strip_non_asm_libtool_args.sh b/strip_non_asm_libtool_args.sh
new file mode 100755 (executable)
index 0000000..d5a61f1
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# libtool assumes that the compiler can handle the -fPIC flag.
+# This isn't always true (for example, nasm can't handle it).
+# Also, on some versions of OS X it tries to pass -fno-common
+# to 'as' which causes problems.
+command=""
+while [ $1 ]; do
+       if [ "$1" != "-fPIC" ]; then
+               if [ "$1" != "-DPIC" ]; then
+                       if [ "$1" != "-fno-common" ]; then
+                               command="$command $1"
+                       fi
+               fi
+       fi
+       shift
+done
+echo $command
+exec $command