Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 235659 Details for
Bug 321867
www-plugins/nspluginwrapper-1.3.0 fails with forced as-needed
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixing as-needed issues
nspluginwrapper-1.2.2-gentoo.diff (text/plain), 12.66 KB, created by
Kacper Kowalik (Xarthisius) (RETIRED)
on 2010-06-16 22:04:21 UTC
(
hide
)
Description:
fixing as-needed issues
Filename:
MIME Type:
Creator:
Kacper Kowalik (Xarthisius) (RETIRED)
Created:
2010-06-16 22:04:21 UTC
Size:
12.66 KB
patch
obsolete
>Fix building with gcc-4.4 and --as-needed, respect LDFLAGS > >http://bugs.gentoo.org/show_bug.cgi?id=278607 >http://bugs.gentoo.org/show_bug.cgi?id=321867 > >--- configure >+++ configure >@@ -391,7 +391,7 @@ > # check for Glib 2.0 compile CFLAGS > if $pkgconfig --exists glib-2.0; then > GLIB_CFLAGS=`$pkgconfig --cflags glib-2.0` >- GLIB_LDFLAGS=`$pkgconfig --libs glib-2.0` >+ GLIB_LIBS=`$pkgconfig --libs glib-2.0` > GLIB_VERSION=`$pkgconfig --modversion glib-2.0` > else > echo "GLIB 2.0 environment not found" >@@ -404,7 +404,7 @@ > return 0; > } > EOF >-if ! $cc $CFLAGS $GLIB_CFLAGS $GLIB_LDFLAGS $TMPC -o $TMPE > /dev/null 2>&1; then >+if ! $cc $CFLAGS $GLIB_CFLAGS $TMPC -o $TMPE $GLIB_LIBS > /dev/null 2>&1; then > echo "GLIB 2.0 environment not usable" > rm -f $TMPC > exit 1 >@@ -415,7 +415,7 @@ > if test "$build_viewer" = "yes" -o "$build_player" = "yes"; then > if $pkgconfig --exists gtk+-2.0; then > GTK_CFLAGS=`$pkgconfig --cflags gtk+-2.0` >- GTK_LDFLAGS=`$pkgconfig --libs gtk+-2.0` >+ GTK_LIBS=`$pkgconfig --libs gtk+-2.0` > GTK_VERSION=`$pkgconfig --modversion gtk+-2.0` > else > echo "GTK+ 2.0 environment not found" >@@ -428,7 +428,7 @@ > return 0; > } > EOF >- if ! $cc $CFLAGS $GTK_CFLAGS $GTK_LDFLAGS $TMPC -o $TMPE > /dev/null 2>&1; then >+ if ! $cc $CFLAGS $GTK_CFLAGS $TMPC -o $TMPE $GTK_LIBS > /dev/null 2>&1; then > echo "GTK+ 2.0 environment not usable" > rm -f $TMPC > exit 1 >@@ -440,12 +440,12 @@ > if test "$build_player" = "yes"; then > if $pkgconfig --exists libcurl; then > CURL_CFLAGS=`$pkgconfig --cflags libcurl` >- CURL_LDFLAGS=`$pkgconfig --libs libcurl` >+ CURL_LIBS=`$pkgconfig --libs libcurl` > else > curlconfig=`which curl-config` > if test -n "$curlconfig"; then > CURL_CFLAGS=`$curlconfig --cflags` >- CURL_LDFLAGS=`$curlconfig --libs` >+ CURL_LIBS=`$curlconfig --libs` > else > echo "cURL environment not found" > exit 1 >@@ -458,7 +458,7 @@ > return 0; > } > EOF >- if ! $cc $CFLAGS $CURL_CFLAGS $CURL_LDFLAGS $TMPC -o $TMPE > /dev/null 2>&1; then >+ if ! $cc $CFLAGS $CURL_CFLAGS $TMPC -o $TMPE $CURL_LIBS > /dev/null 2>&1; then > echo "cURL environment not usable" > rm -f $TMPC > exit 1 >@@ -686,11 +686,11 @@ > echo "CXX=$cxx" >> $config_mak > echo "CFLAGS=$CFLAGS" >> $config_mak > echo "GLIB_CFLAGS=$GLIB_CFLAGS" >> $config_mak >-echo "GLIB_LDFLAGS=$GLIB_LDFLAGS" >> $config_mak >+echo "GLIB_LIBS=$GLIB_LIBS" >> $config_mak > echo "GTK_CFLAGS=$GTK_CFLAGS" >> $config_mak >-echo "GTK_LDFLAGS=$GTK_LDFLAGS" >> $config_mak >+echo "GTK_LIBS=$GTK_LIBS" >> $config_mak > echo "CURL_CFLAGS=$CURL_CFLAGS" >> $config_mak >-echo "CURL_LDFLAGS=$CURL_LDFLAGS" >> $config_mak >+echo "CURL_LIBS=$CURL_LIBS" >> $config_mak > if test "$biarch" = "yes"; then > echo "LDFLAGS_32=-m32" >> $config_mak > echo "CFLAGS_32=$CFLAGS_32" >> $config_mak >--- Makefile >+++ Makefile >@@ -41,6 +41,8 @@ > STRIP_OPT = -s > endif > >+USE_SYSTEM_LIBS = 1 >+ > LN_S = ln -sf > > ifeq ($(LD_soname),) >@@ -51,16 +53,16 @@ > endif > > ifneq (,$(findstring $(OS),linux)) >-libdl_LDFLAGS = -ldl >+libdl_LIBS = -ldl > endif > >-libpthread_LDFLAGS = -lpthread >+libpthread_LIBS = -lpthread > ifeq ($(OS),dragonfly) >-libpthread_LDFLAGS = -pthread >+libpthread_LIBS = -pthread > endif > > ifneq (,$(findstring $(OS),solaris)) >-libsocket_LDFLAGS = -lsocket -lnsl >+libsocket_LIBS = -lsocket -lnsl > endif > > PIC_CFLAGS = -fPIC >@@ -70,8 +72,8 @@ > DSO_LDFLAGS = -qmkshrobj > endif > >-X_CFLAGS = -I$(x11prefix)/include >-X_LDFLAGS = -L$(x11prefix)/$(lib64) -lX11 -lXt >+X_CFLAGS = `pkg-config --cflags xt` >+X_LIBS = `pkg-config --libs xt` > ifneq (,$(findstring $(OS),netbsd dragonfly)) > X_LDFLAGS += -Wl,--rpath,$(x11prefix)/$(lib64) > endif >@@ -79,6 +81,11 @@ > ARCH_32 = $(ARCH) > ifeq ($(biarch), yes) > ARCH_32 = $(TARGET_ARCH) >+endif >+ >+ifneq (1, $(USE_SYSTEM_LIBS)) >+ >+ifeq ($(biarch), yes) > LSB_LIBS = $(LSB_OBJ_DIR)/libc.so $(LSB_OBJ_DIR)/libgcc_s_32.so > LSB_LIBS += $(LSB_CORE_STUBS:%=$(LSB_OBJ_DIR)/%.so) > LSB_LIBS += $(LSB_CORE_STATIC_STUBS:%=$(LSB_OBJ_DIR)/%.a) >@@ -92,6 +99,7 @@ > LSB_CORE_STUBS = $(shell cat $(LSB_SRC_DIR)/core_filelist) > LSB_CORE_STATIC_STUBS = $(shell cat $(LSB_SRC_DIR)/core_static_filelist) > LSB_DESKTOP_STUBS = $(shell cat $(LSB_SRC_DIR)/desktop_filelist) >+endif > > ifeq (i386,$(TARGET_ARCH)) > TARGET_ELF_ARCH = elf32-i386 >@@ -107,8 +115,9 @@ > npwrapper_SOURCES = $(npwrapper_RAWSRCS:%.c=$(SRC_PATH)/src/%.c) > npwrapper_OBJECTS = $(npwrapper_RAWSRCS:%.c=npwrapper-%.os) > npwrapper_CFLAGS = $(CFLAGS) $(X_CFLAGS) $(MOZILLA_CFLAGS) $(GLIB_CFLAGS) >-npwrapper_LDFLAGS = $(X_LDFLAGS) $(libpthread_LDFLAGS) $(libsocket_LDFLAGS) >-npwrapper_LDFLAGS += $(GLIB_LDFLAGS) >+npwrapper_LIBS = $(X_LIBS) $(libpthread_LIBS) $(libsocket_LIBS) >+npwrapper_LIBS += $(GLIB_LIBS) >+npwrapper_LDFLAGS += $(LDFLAGS) > > npviewer_PROGRAM = npviewer.bin > npviewer_RAWSRCS = npw-viewer.c npw-common.c npw-malloc.c npw-rpc.c rpc.c debug.c utils.c npruntime.c >@@ -116,17 +125,22 @@ > npviewer_OBJECTS = $(npviewer_RAWSRCS:%.c=npviewer-%.o) > ifeq ($(biarch),yes) > npviewer_CFLAGS = $(CFLAGS_32) >+ifneq (1, $(USE_SYSTEM_LIBS)) > npviewer_CFLAGS += -I$(LSB_INC_DIR) > npviewer_CFLAGS += -I$(LSB_INC_DIR)/glib-2.0 > npviewer_CFLAGS += -I$(LSB_INC_DIR)/gtk-2.0 > npviewer_LDFLAGS = $(LDFLAGS_32) -L$(LSB_OBJ_DIR) >-npviewer_LDFLAGS += -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -ldl -lglib-2.0 -lX11 -lXt >+else >+npviewer_CFLAGS += $(shell pkg-config --cflags gtk+-2.0 glib-2.0) >+npviewer_LDFLAGS = $(LDFLAGS_32) >+endif >+npviewer_LIBS += -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -ldl -lglib-2.0 -lX11 -lXt > else > npviewer_CFLAGS += $(GTK_CFLAGS) >-npviewer_LDFLAGS = $(GTK_LDFLAGS) $(X_LDFLAGS) >+npviewer_LIBS = $(GTK_LIBS) $(X_LIBS) > endif > npviewer_CFLAGS += $(MOZILLA_CFLAGS) >-npviewer_LDFLAGS += $(libdl_LDFLAGS) $(libpthread_LDFLAGS) -lgthread-2.0 >+npviewer_LIBS += $(libdl_LIBS) $(libpthread_LIBS) `pkg-config --libs gthread-2.0` > ifeq ($(TARGET_OS):$(TARGET_ARCH),linux:i386) > npviewer_MAPFILE = $(SRC_PATH)/src/npw-viewer.map > endif >@@ -137,18 +151,18 @@ > ifeq ($(TARGET_OS):$(TARGET_ARCH),linux:i386) > npviewer_SOURCES += $(SRC_PATH)/src/cxxabi-compat.cpp > npviewer_OBJECTS += npviewer-cxxabi-compat.o >-npviewer_LDFLAGS += -lsupc++ >+npviewer_LIBS += -lsupc++ > endif > ifeq ($(TARGET_OS):$(TARGET_ARCH),solaris:i386) >-npviewer_LDFLAGS += $(libsocket_LDFLAGS) >+npviewer_LIBS += $(libsocket_LIBS) > endif > > npplayer_PROGRAM = npplayer > npplayer_SOURCES = npw-player.c debug.c rpc.c utils.c glibcurl.c gtk2xtbin.c $(tidy_SOURCES) > npplayer_OBJECTS = $(npplayer_SOURCES:%.c=npplayer-%.o) > npplayer_CFLAGS = $(GTK_CFLAGS) $(MOZILLA_CFLAGS) $(CURL_CFLAGS) $(X_CFLAGS) >-npplayer_LDFLAGS = $(GTK_LDFLAGS) $(CURL_LDFLAGS) $(X_LDFLAGS) >-npplayer_LDFLAGS += -lgthread-2.0 $(libpthread_LDFLAGS) $(libsocket_LDFLAGS) >+npplayer_LIBS = $(GTK_LIBS) $(CURL_LIBS) $(X_LIBS) >+npplayer_LIBS += `pkg-config --libs gthread-2.0` $(libpthread_LIBS) $(libsocket_LIBS) > > libxpcom_LIBRARY = libxpcom.so > libxpcom_RAWSRCS = libxpcom.c debug.c >@@ -156,8 +170,11 @@ > libxpcom_OBJECTS = $(libxpcom_RAWSRCS:%.c=libxpcom-%.o) > libxpcom_CFLAGS = $(PIC_CFLAGS) > ifeq ($(biarch),yes) >+libxpcom_LDFLAGS = $(LDFLAGS_32) >+ifneq (1, $(USE_SYSTEM_LIBS)) > libxpcom_CFLAGS += -I$(LSB_INC_DIR) >-libxpcom_LDFLAGS = $(LDFLAGS_32) -L$(LSB_OBJ_DIR) >+libxpcom_LDFLAGS += -L$(LSB_OBJ_DIR) >+endif > endif > > libnoxshm_LIBRARY = libnoxshm.so >@@ -166,21 +183,25 @@ > libnoxshm_OBJECTS = $(libnoxshm_RAWSRCS:%.c=libnoxshm-%.o) > libnoxshm_CFLAGS = $(PIC_CFLAGS) > ifeq ($(biarch),yes) >+libnoxshm_LDFLAGS = $(LDFLAGS_32) >+ifneq (1, $(USE_SYSTEM_LIBS)) > libnoxshm_CFLAGS += -I$(LSB_INC_DIR) >-libnoxshm_LDFLAGS = $(LDFLAGS_32) -L$(LSB_OBJ_DIR) >+libnoxshm_LDFLAGS += -L$(LSB_OBJ_DIR) >+endif > endif > > npconfig_PROGRAM = npconfig > npconfig_RAWSRCS = npw-config.c > npconfig_SOURCES = $(npconfig_RAWSRCS:%.c=$(SRC_PATH)/src/%.c) > npconfig_OBJECTS = $(npconfig_RAWSRCS:%.c=npconfig-%.o) >-npconfig_LDFLAGS = $(libdl_LDFLAGS) >+npconfig_LIBS = $(libdl_LIBS) > ifneq (,$(findstring $(OS),netbsd dragonfly)) > # We will try to dlopen() the native plugin library. If that lib is > # linked against libpthread, then so must our program too. > # XXX use the ELF decoder for native plugins too? >-npconfig_LDFLAGS += $(libpthread_LDFLAGS) >+npconfig_LIBS += $(libpthread_LIBS) > endif >+npconfig_LDFLAGS += $(LDFLAGS) > > nploader_PROGRAM = npviewer > nploader_RAWSRCS = npw-viewer.sh >@@ -192,7 +213,7 @@ > test_rpc_client_CPPFLAGS = $(CPPFLAGS) -I$(SRC_PATH)/src -DBUILD_CLIENT -DNPW_COMPONENT_NAME="\"Client\"" > test_rpc_server_CPPFLAGS = $(CPPFLAGS) -I$(SRC_PATH)/src -DBUILD_SERVER -DNPW_COMPONENT_NAME="\"Server\"" > test_rpc_CFLAGS = -I$(SRC_PATH)/src $(GLIB_CFLAGS) >-test_rpc_LDFLAGS = $(GLIB_LDFLAGS) $(libpthread_LDFLAGS) $(libsocket_LDFLAGS) >+test_rpc_LIBS = $(GLIB_LIBS) $(libpthread_LIBS) $(libsocket_LIBS) > test_rpc_RAWPROGS = \ > test-rpc-types \ > test-rpc-nested-1 \ >@@ -230,6 +251,7 @@ > FILES += $(wildcard tests/*.html) > FILES += $(wildcard tests/*.c tests/*.h) > FILES += $(wildcard npapi/*.h npapi/nspr/*.h npapi/nspr/obsolete/*.h) >+ifneq (1, $(USE_SYSTEM_LIBS)) > FILES += $(LSB_TOP_DIR)/headers/core_filelist > FILES += $(addprefix $(LSB_TOP_DIR)/headers/,$(shell cat $(LSB_TOP_DIR)/headers/core_filelist)) > FILES += $(LSB_TOP_DIR)/headers/desktop_filelist >@@ -243,12 +265,15 @@ > FILES += $(patsubst %,$(LSB_SRC_DIR)/%.c,$(LSB_CORE_STATIC_STUBS)) > FILES += $(patsubst %,$(LSB_SRC_DIR)/%.c,$(LSB_DESKTOP_STUBS)) > FILES += $(patsubst %,$(LSB_SRC_DIR)/%.Version,$(LSB_DESKTOP_STUBS)) >+endif > > all: $(TARGETS) > > clean: > rm -f $(TARGETS) *.o *.os >+ifneq (1, $(USE_SYSTEM_LIBS)) > rm -rf $(LSB_OBJ_DIR) >+endif > > distclean: clean > rm -f config-host.* config.* >@@ -372,13 +397,13 @@ > svn commit -m "Generated by svn2cl." ChangeLog > > $(npwrapper_LIBRARY): $(npwrapper_OBJECTS) >- $(CC) -o $@ $(DSO_LDFLAGS) $(npwrapper_OBJECTS) $(npwrapper_LDFLAGS) >+ $(CC) -o $@ $(DSO_LDFLAGS) $(npwrapper_LDFLAGS) $(npwrapper_OBJECTS) $(npwrapper_LIBS) > > npwrapper-%.os: $(SRC_PATH)/src/%.c > $(CC) -o $@ -c $< $(PIC_CFLAGS) $(CPPFLAGS) $(npwrapper_CFLAGS) -DBUILD_WRAPPER > > $(npviewer_PROGRAM): $(npviewer_OBJECTS) $(npviewer_MAPFILE) $(LSB_OBJ_DIR) $(LSB_LIBS) >- $(CC) $(LDFLAGS_32) -o $@ $(npviewer_OBJECTS) $(npviewer_LDFLAGS) >+ $(CC) $(LDFLAGS_32) -o $@ $(npviewer_LDFLAGS) $(npviewer_OBJECTS) $(npviewer_LIBS) > > npviewer-%.o: $(SRC_PATH)/src/%.c > $(CC) $(CFLAGS_32) -o $@ -c $< $(CPPFLAGS) $(npviewer_CFLAGS) -DBUILD_VIEWER >@@ -387,7 +412,7 @@ > $(CXX) $(CFLAGS_32) -o $@ -c $< $(CPPFLAGS) $(npviewer_CFLAGS) -DBUILD_VIEWER > > $(npplayer_PROGRAM): $(npplayer_OBJECTS) $(npplayer_MAPFILE) $(LSB_OBJ_DIR) $(LSB_LIBS) >- $(CC) $(LDFLAGS) -o $@ $(npplayer_OBJECTS) $(npplayer_LDFLAGS) >+ $(CC) $(LDFLAGS) $(npplayer_LDFLAGS) -o $@ $(npplayer_OBJECTS) $(npplayer_LIBS) > > npplayer-%.o: $(SRC_PATH)/src/%.c > $(CC) $(CFLAGS) -o $@ -c $< $(CPPFLAGS) $(npplayer_CFLAGS) -DBUILD_PLAYER >@@ -395,19 +420,19 @@ > $(CC) $(CFLAGS) -o $@ -c $< $(CPPFLAGS) $(npplayer_CFLAGS) -DBUILD_PLAYER > > $(libxpcom_LIBRARY): $(libxpcom_OBJECTS) $(LSB_OBJ_DIR) $(LSB_LIBS) >- $(CC) $(LDFLAGS_32) $(DSO_LDFLAGS) -o $@ $(libxpcom_OBJECTS) $(libxpcom_LDFLAGS) -Wl,$(LD_soname),libxpcom.so >+ $(CC) $(LDFLAGS_32) $(DSO_LDFLAGS) $(libxpcom_LDFLAGS) -o $@ $(libxpcom_OBJECTS) $(libxpcom_LIBS) -Wl,$(LD_soname),libxpcom.so > > libxpcom-%.o: $(SRC_PATH)/src/%.c > $(CC) $(CFLAGS_32) -o $@ -c $< $(CPPFLAGS) $(libxpcom_CFLAGS) -DBUILD_XPCOM > > $(libnoxshm_LIBRARY): $(libnoxshm_OBJECTS) $(LSB_OBJ_DIR) $(LSB_LIBS) >- $(CC) $(LDFLAGS_32) $(DSO_LDFLAGS) -o $@ $(libnoxshm_OBJECTS) $(libnoxshm_LDFLAGS) -Wl,$(LD_soname),libnoxshm.so >+ $(CC) $(LDFLAGS_32) $(DSO_LDFLAGS) $(libnoxshm_LDFLAGS) -o $@ $(libnoxshm_OBJECTS) $(libnoxshm_LIBS) -Wl,$(LD_soname),libnoxshm.so > > libnoxshm-%.o: $(SRC_PATH)/src/%.c > $(CC) $(CFLAGS_32) -o $@ -c $< $(CPPFLAGS) $(libnoxshm_CFLAGS) > > $(npconfig_PROGRAM): $(npconfig_OBJECTS) >- $(CC) -o $@ $(npconfig_OBJECTS) $(npconfig_LDFLAGS) >+ $(CC) $(npconfig_LDFLAGS) -o $@ $(npconfig_OBJECTS) $(npconfig_LIBS) > > npconfig-%.o: $(SRC_PATH)/src/%.c > $(CC) -o $@ -c $< $(CPPFLAGS) $(CFLAGS) >@@ -438,13 +463,13 @@ > -Wl,-soname,`grep "$(patsubst $(LSB_OBJ_DIR)/%.o,%,$<) " $(LSB_SRC_DIR)/LibNameMap.txt | cut -f2 -d' '` > > test-rpc-%-client: test-rpc-%-client.o $(test_rpc_client_OBJECTS) >- $(CC) -o $@ $< $(test_rpc_client_OBJECTS) $(test_rpc_LDFLAGS) >+ $(CC) $(test_rpc_LDFLAGS) -o $@ $< $(test_rpc_client_OBJECTS) $(test_rpc_LIBS) > test-rpc-%-client.o: $(SRC_PATH)/tests/test-rpc-%.c > $(CC) -o $@ -c $< $(test_rpc_client_CPPFLAGS) $(test_rpc_CFLAGS) > %-client.o: $(SRC_PATH)/src/%.c > $(CC) -o $@ -c $< $(test_rpc_client_CPPFLAGS) $(test_rpc_CFLAGS) > test-rpc-%-server: test-rpc-%-server.o $(test_rpc_server_OBJECTS) >- $(CC) -o $@ $< $(test_rpc_server_OBJECTS) $(test_rpc_LDFLAGS) >+ $(CC) $(test_rpc_LDFLAGS) -o $@ $< $(test_rpc_server_OBJECTS) $(test_rpc_LIBS) > test-rpc-%-server.o: $(SRC_PATH)/tests/test-rpc-%.c > $(CC) -o $@ -c $< $(test_rpc_server_CPPFLAGS) $(test_rpc_CFLAGS) > %-server.o: $(SRC_PATH)/src/%.c
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 321867
:
233303
|
235657
| 235659