diff options
author | theuni <theuni-nospam-@xbmc.org> | 2011-09-16 01:02:39 -0400 |
---|---|---|
committer | theuni <theuni-nospam-@xbmc.org> | 2011-09-16 15:54:27 -0400 |
commit | 493650feac5c2143d33cd527536797b1c8b3db6c (patch) | |
tree | 93864ee19a0f79c892f395b0919a36a508057855 /lib | |
parent | 4511eb1fcf75c2b562a4b0da2018572f6865ae17 (diff) |
build: 3rd party lib linking symbols cleanup
Fix several linking concerns that are usually masked in one way or another.
To see, add -Wl,--unresolved-symbols=ignore-in-shared-libs to LDFLAGS
1. The 3rd party libs that we build can't resolve our wrapped functions until
runtime, so tell the linker not to expect them.
2. Various vis and screensavers were relying on XBMC bringing in GL libs.
With these fixes, linking opts like --unresolved-symbols=ignore-in-shared-libs
now work properly. This is useful for annoying libs like gles or egl which
may depend on other libs that cannot resolve at link-time.
TODO: ProjectM still neeeds attention
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cximage-6.0/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libdvd/Makefile.in | 3 | ||||
-rw-r--r-- | lib/libexif/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libhdhomerun/Makefile.in | 3 | ||||
-rw-r--r-- | lib/libid3tag/Makefile.in | 2 | ||||
-rw-r--r-- | lib/libsidplay2/Makefile.in | 3 | ||||
-rw-r--r-- | lib/nosefart/Makefile.in | 3 | ||||
-rw-r--r-- | lib/snesapu/SNES/SNESAPU/Makefile.in | 2 | ||||
-rw-r--r-- | lib/stsound/StSoundLibrary/Makefile.in | 3 | ||||
-rw-r--r-- | lib/timidity/Makefile.in | 3 | ||||
-rw-r--r-- | lib/vgmstream/Makefile.in | 3 | ||||
-rw-r--r-- | lib/xbadpcm/Makefile.in | 3 |
12 files changed, 20 insertions, 12 deletions
diff --git a/lib/cximage-6.0/Makefile.in b/lib/cximage-6.0/Makefile.in index 915e5cd83e..9981e05662 100644 --- a/lib/cximage-6.0/Makefile.in +++ b/lib/cximage-6.0/Makefile.in @@ -22,7 +22,7 @@ ifeq ($(findstring osx,$(ARCH)), osx) @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o CxImage/*.o jasper/*/*.o jbig/*.o raw/*.o else $(CXX) $(CFLAGS) $(LDFLAGS) -shared -o $(SLIB) -Wl,--whole-archive $(SLIBS) \ - -Wl,--no-whole-archive -lpng -ljasper -ljpeg -ltiff -lz \ + -Wl,--no-whole-archive -lpng -ljasper -ljpeg -ltiff -lz -Wl,--unresolved-symbols=ignore-all \ `cat ../../xbmc/cores/DllLoader/exports/wrapper.def` \ ../../xbmc/cores/DllLoader/exports/wrapper.o endif diff --git a/lib/libdvd/Makefile.in b/lib/libdvd/Makefile.in index 0e36a6a080..686b4075ae 100644 --- a/lib/libdvd/Makefile.in +++ b/lib/libdvd/Makefile.in @@ -56,11 +56,12 @@ else $(SYSDIR)/libdvdcss-$(ARCH).so: $(WRAPPER) libdvdcss/src/.libs/libdvdcss.a $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ \ - libdvdcss/src/*.o \ + libdvdcss/src/*.o -Wl,--unresolved-symbols=ignore-all \ `cat $(WRAPPER:.o=.def)` $(WRAPPER) $(SYSDIR)/libdvdnav-$(ARCH).so: $(WRAPPER) $(DVDCSS_A) libdvdread/obj/libdvdread.a libdvdnav/obj/libdvdnav.a $(CC) -o $@ $(LDFLAGS) -Wl,--soname,$@ $(DVDCSS_O) libdvdread/obj/*.o libdvdnav/obj/*.o \ + -Wl,--unresolved-symbols=ignore-all \ `cat $(WRAPPER:.o=.def)` $(WRAPPER) endif diff --git a/lib/libexif/Makefile.in b/lib/libexif/Makefile.in index 292bc4b408..cab9560dd1 100644 --- a/lib/libexif/Makefile.in +++ b/lib/libexif/Makefile.in @@ -14,7 +14,7 @@ ifeq ($(findstring osx,$(ARCH)), osx) -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) else - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) \ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \ `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif diff --git a/lib/libhdhomerun/Makefile.in b/lib/libhdhomerun/Makefile.in index e447acaae8..825bbde184 100644 --- a/lib/libhdhomerun/Makefile.in +++ b/lib/libhdhomerun/Makefile.in @@ -24,7 +24,8 @@ ifeq ($(findstring osx,$(ARCH)), osx) -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) else - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -shared -o $@ `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` \ + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -shared -o $@ -Wl,--unresolved-symbols=ignore-all \ + `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif diff --git a/lib/libid3tag/Makefile.in b/lib/libid3tag/Makefile.in index dba5b8775c..c4c4ba7220 100644 --- a/lib/libid3tag/Makefile.in +++ b/lib/libid3tag/Makefile.in @@ -16,7 +16,7 @@ $(SLIB): libid3tag/.libs/libid3tag.dylib chmod +x $@ else $(SLIB): libid3tag/.libs/libid3tag.so - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC -o $@ libid3tag/.libs/*.o \ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC -Wl,--unresolved-symbols=ignore-all -o $@ libid3tag/.libs/*.o \ `cat ../../xbmc/cores/DllLoader/exports/wrapper.def` \ ../../xbmc/cores/DllLoader/exports/wrapper.o endif diff --git a/lib/libsidplay2/Makefile.in b/lib/libsidplay2/Makefile.in index 86a33e745c..b4cb698203 100644 --- a/lib/libsidplay2/Makefile.in +++ b/lib/libsidplay2/Makefile.in @@ -57,7 +57,8 @@ ifeq ($(findstring osx,$(ARCH)), osx) -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O) else - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \ + `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif include @abs_top_srcdir@/Makefile.include diff --git a/lib/nosefart/Makefile.in b/lib/nosefart/Makefile.in index edbaaa93b1..f8a8397cec 100644 --- a/lib/nosefart/Makefile.in +++ b/lib/nosefart/Makefile.in @@ -31,7 +31,8 @@ ifeq ($(findstring osx,$(ARCH)), osx) -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O) else - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \ + `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif include @abs_top_srcdir@/Makefile.include diff --git a/lib/snesapu/SNES/SNESAPU/Makefile.in b/lib/snesapu/SNES/SNESAPU/Makefile.in index e7ade0bdc1..89c9955851 100644 --- a/lib/snesapu/SNES/SNESAPU/Makefile.in +++ b/lib/snesapu/SNES/SNESAPU/Makefile.in @@ -21,7 +21,7 @@ ifeq ($(findstring osx,$(ARCH)), osx) -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) else - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) \ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \ `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif diff --git a/lib/stsound/StSoundLibrary/Makefile.in b/lib/stsound/StSoundLibrary/Makefile.in index 0f30a115d4..595cf8711b 100644 --- a/lib/stsound/StSoundLibrary/Makefile.in +++ b/lib/stsound/StSoundLibrary/Makefile.in @@ -24,7 +24,8 @@ ifeq ($(findstring osx,$(ARCH)), osx) -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O) else - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \ + `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif include @abs_top_srcdir@/Makefile.include diff --git a/lib/timidity/Makefile.in b/lib/timidity/Makefile.in index fef6e28fce..3e33e8926c 100644 --- a/lib/timidity/Makefile.in +++ b/lib/timidity/Makefile.in @@ -56,7 +56,8 @@ ifeq ($(findstring osx,$(ARCH)), osx) $(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias -bundle \ -undefined dynamic_lookup -read_only_relocs suppress -o $@ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O) else - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o -Wl,--version-script=exports.def + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` \ + @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o -Wl,--version-script=exports.def endif include @abs_top_srcdir@/Makefile.include diff --git a/lib/vgmstream/Makefile.in b/lib/vgmstream/Makefile.in index 361a4cb42e..edbaceff23 100644 --- a/lib/vgmstream/Makefile.in +++ b/lib/vgmstream/Makefile.in @@ -199,7 +199,8 @@ ifeq ($(findstring osx,$(ARCH)), osx) -bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \ @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS) $(BUNDLE1_O) else - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \ + `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif diff --git a/lib/xbadpcm/Makefile.in b/lib/xbadpcm/Makefile.in index 894146c771..2a53042781 100644 --- a/lib/xbadpcm/Makefile.in +++ b/lib/xbadpcm/Makefile.in @@ -12,7 +12,8 @@ ifeq ($(findstring osx,$(ARCH)), osx) @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o *.o $(BUNDLE1_O) chmod +x $@ else - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ *.o `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ *.o -Wl,--unresolved-symbols=ignore-all \ + `cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o endif include @abs_top_srcdir@/Makefile.include |