automake: don't enable -Wl,--no-undefined on OpenBSD
authorJonathan Gray <jsg@jsg.id.au>
Thu, 3 Apr 2014 04:46:01 +0000 (15:46 +1100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 5 Apr 2014 12:30:27 +0000 (13:30 +0100)
OpenBSD does not have DT_NEEDED entries for libc by design,
over concerns how the symbols would be referenced after
changing the major version of the library.

So avoid -no-undefined checks on OpenBSD as they will fail.

v2: don't include the -no-undefined libtool option in the variable
    and change -Wl,--no-undefined references in Automake.inc as well.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76856
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
18 files changed:
src/egl/main/Makefile.am
src/egl/wayland/wayland-egl/Makefile.am
src/gallium/Automake.inc
src/gallium/targets/egl-static/Makefile.am
src/gallium/targets/gbm/Makefile.am
src/gallium/targets/libgl-xlib/Makefile.am
src/gallium/targets/opencl/Makefile.am
src/gallium/targets/osmesa/Makefile.am
src/gallium/targets/pipe-loader/Makefile.am
src/gallium/targets/xa/Makefile.am
src/gbm/Makefile.am
src/glx/Makefile.am
src/mapi/es1api/Makefile.am
src/mapi/es2api/Makefile.am
src/mapi/shared-glapi/Makefile.am
src/mapi/vgapi/Makefile.am
src/mesa/drivers/osmesa/Makefile.am
src/mesa/drivers/x11/Makefile.am

index e4c2539f73c6bb9422dcc9be56bc8f3ad6ef81e7..4b42bd66070d32b204dff666348455402153f00b 100644 (file)
@@ -78,7 +78,7 @@ libEGL_la_LDFLAGS = \
        -version-number 1:0 \
        -Wl,-Bsymbolic \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 if HAVE_EGL_PLATFORM_X11
 AM_CFLAGS += -DHAVE_X11_PLATFORM
index d3fe11769ecf5c0877f8356319d199e31e01f3cc..a03a7bfc72886a698862e9130a7915fe4cf103ea 100644 (file)
@@ -12,7 +12,7 @@ libwayland_egl_la_LDFLAGS = \
        -no-undefined \
        -version-info 1 \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 TESTS = wayland-egl-symbols-check
 
index 7b75a928843da8d3f0f7073ddd9ede5bad7468f0..bafde36c6b0f3de9072c5d2640a27bdcaa5f2940 100644 (file)
@@ -67,7 +67,7 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
        -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
        -export-symbols-regex $(VDPAU_EXPORTS) \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 GALLIUM_XVMC_LINKER_FLAGS = \
        -shared \
@@ -76,7 +76,7 @@ GALLIUM_XVMC_LINKER_FLAGS = \
        -version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
        -export-symbols-regex '^XvMC' \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 GALLIUM_OMX_LINKER_FLAGS = \
        -shared \
@@ -84,7 +84,7 @@ GALLIUM_OMX_LINKER_FLAGS = \
        -no-undefined \
        -export-symbols-regex $(EXPORTS) \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 GALLIUM_COMMON_LIB_DEPS = \
        -lm \
index a133cd1b6c13d0275c8c3fe8aa863c419cfa598b..221cb712d70e12c5a6728ce3ce94b262d4ece324 100644 (file)
@@ -49,7 +49,7 @@ AM_LDFLAGS = \
        -no-undefined \
        -avoid-version \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined \
+       $(LD_NO_UNDEFINED) \
        -Wl,--version-script=$(top_srcdir)/src/gallium/targets/egl-static/egl.link
 
 egldir = $(EGL_DRIVER_INSTALL_DIR)
index b659ac436424a0adc72a7de0dbc5abf6f1694bb8..3b7929066b1d18693636fa0ad4c35ca452609767 100644 (file)
@@ -68,7 +68,7 @@ gbm_gallium_drm_la_LDFLAGS = \
        -no-undefined \
        -avoid-version \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 if HAVE_MESA_LLVM
 gbm_gallium_drm_la_LIBADD += $(LLVM_LIBS)
index ef3d23ebcd9e5eb1142b035d66d578a4759dfc70..4ee364e7366e0c14ac53f3c0604a2ee228e8e37c 100644 (file)
@@ -48,7 +48,7 @@ libGL_la_LDFLAGS = \
        -no-undefined \
        -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 libGL_la_LIBADD = \
        $(top_builddir)/src/gallium/state_trackers/glx/xlib/libxlib.la \
index aae31ff33660995e4c5dc00caf2b136e9a78e5b6..f23c26b330159610af0ae32c4179a1c99ff87b14 100644 (file)
@@ -7,7 +7,7 @@ lib@OPENCL_LIBNAME@_la_LDFLAGS = \
        -no-undefined \
        -version-number 1:0 \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 
 lib@OPENCL_LIBNAME@_la_LIBADD = \
index 559135cc5fe86e505480e8e68585b3929f81fe55..8b7eb00116c483d103814bf00cc05b965c8e9a1d 100644 (file)
@@ -44,7 +44,7 @@ lib@OSMESA_LIB@_la_LDFLAGS = \
        -no-undefined \
        -version-number @OSMESA_VERSION@ \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 
 if HAVE_SHARED_GLAPI
index a35ef358a50698c103f0af6fd1f0d7823e5da235..76271a15fed3f610d0f50f037df70519261dbef6 100644 (file)
@@ -47,7 +47,7 @@ AM_LDFLAGS = \
        -no-undefined \
        -avoid-version \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined \
+       $(LD_NO_UNDEFINED) \
        -Wl,--version-script=$(top_srcdir)/src/gallium/targets/pipe-loader/pipe.link
 
 if HAVE_MESA_LLVM
index 3c0caf97a1881e281bf3b0d0956f29a4b201c5a0..4b351d907bbe77ed766505d11516a0aa3dc3bed6 100644 (file)
@@ -64,7 +64,7 @@ libxatracker_la_LDFLAGS = \
        -no-undefined \
        -version-number $(XA_MAJOR):$(XA_MINOR):$(XA_TINY) \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 if HAVE_MESA_LLVM
 libxatracker_la_LIBADD += $(LLVM_LIBS)
index ea06ce1607d4b5ae814529bd02e85d8a1b39d6a4..48951b80af1d2c322a3182afed817b87241efc0b 100644 (file)
@@ -23,7 +23,7 @@ libgbm_la_LDFLAGS = \
        -no-undefined \
        -version-info 1:0 \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 libgbm_la_LIBADD = \
        $(top_builddir)/src/loader/libloader.la \
index aa7666aa93cccb379a5150edaae85ca81e5e1da5..482d952302dee2368d9eabc295a599b2970125dd 100644 (file)
@@ -113,7 +113,7 @@ GL_LDFLAGS = \
        -version-number 1:2 \
        -Wl,-Bsymbolic \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 lib@GL_LIB@_la_SOURCES =
 lib@GL_LIB@_la_LIBADD = $(GL_LIBS)
index febb137eafa71210c617b7b2f6c237b12cb75f6e..63ea5e74e06d0264f121c35c6c5e449abbce9df2 100644 (file)
@@ -48,7 +48,7 @@ libGLESv1_CM_la_LDFLAGS = \
        -no-undefined \
        -version-number 1:1 \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 if HAVE_SHARED_GLAPI
 libGLESv1_CM_la_LIBADD += ../shared-glapi/libglapi.la
index c9dd1e0a2690dcb0ecbe0cc7d10a63ed8434cbcf..337f9021989b13e689a755a2d38016fc3e819297 100644 (file)
@@ -53,7 +53,7 @@ libGLESv2_la_LDFLAGS = \
        -no-undefined \
        -version-number 2 \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 if HAVE_SHARED_GLAPI
 libGLESv2_la_LIBADD += ../shared-glapi/libglapi.la
index 33a939a90f9d25df6abe439c91108873be600da8..330719c85b06028de1ab9feeb60e7adb9ac2d7e6 100644 (file)
@@ -12,7 +12,7 @@ libglapi_la_LIBADD = $(PTHREAD_LIBS) $(SELINUX_LIBS)
 libglapi_la_LDFLAGS = \
        -no-undefined \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 include $(GLAPI)/gen/glapi_gen.mk
 glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
index f946b9bb6f95528281261c13020c8394d86d9734..a2b13e5b7b9c91300fef4c7bd110df12880f6ead 100644 (file)
@@ -48,7 +48,7 @@ libOpenVG_la_LDFLAGS = \
        -no-undefined \
        -version-number 1 \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 vgapi_tmp.h: $(srcdir)/vgapi.csv $(top_srcdir)/src/mapi/mapi_abi.py
        $(AM_V_GEN) $(PYTHON2) $(PYTHON_FLAGS) $(top_srcdir)/src/mapi/mapi_abi.py \
index b133fd679220669f1a14f5b71644793baea4f2c4..415779294340898e9308d30b91bff16476ac63fe 100644 (file)
@@ -40,7 +40,7 @@ lib@OSMESA_LIB@_la_LDFLAGS = \
        -no-undefined \
        -version-number @OSMESA_VERSION@ \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 
 if HAVE_SHARED_GLAPI
index 2b38ad31101d336f56a906793f17b0b6a88634ce..7a3513233f014375352d7bb25741f778e56e8733 100644 (file)
@@ -65,6 +65,6 @@ lib@GL_LIB@_la_LDFLAGS = \
        -no-undefined \
        -version-number $(GL_MAJOR):$(GL_MINOR):$(GL_PATCH) \
        $(GC_SECTIONS) \
-       -Wl,--no-undefined
+       $(LD_NO_UNDEFINED)
 
 include $(top_srcdir)/install-lib-links.mk