vlc/vlc-3.0 | branch: master | Martin Storsjö <[email protected]> | Thu Dec 21 23:34:29 2017 +0200| [3781ffd307f5160b4b6f454f9b1412e4c4ef0288] | committer: Steve Lhomme
contribs: glew: Simplify/improve the win32 patch, fix building with lld The previous version of win32.patch left things in a bit more broken state than necessary. The previous version of the patch removed LD=gcc and removed a number of flags, making the build trying to build a DLL (but without the option -shared), actually producing an EXE. (The linked DLLs are later actually removed by the contribs build system.) Instead of removing LD=gcc, change it into LD=$(CC) which is more what glew originally intended, and keep the flags for linking shared libraries (but remove the -soname option which isn't supported by neither GNU ld nor lld). This fixes building in setups where $(LD) points to lld. Signed-off-by: Hugo Beauzée-Luyssen <[email protected]> (cherry picked from commit 41b5dca1f870aa1fbc32703daf875c35aa979fd9) Signed-off-by: Steve Lhomme <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=3781ffd307f5160b4b6f454f9b1412e4c4ef0288 --- contrib/src/glew/win32.patch | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/contrib/src/glew/win32.patch b/contrib/src/glew/win32.patch index 4205695b79..49dded7bd8 100644 --- a/contrib/src/glew/win32.patch +++ b/contrib/src/glew/win32.patch @@ -73,29 +73,30 @@ diff -ruN glew/config/Makefile.mingw glew.new/config/Makefile.mingw --- glew/config/Makefile.mingw 2011-08-25 16:17:55.000000000 +0200 -+++ glew.new/config/Makefile.mingw 2012-02-25 16:42:36.603751173 +0100 -@@ -1,8 +1,6 @@ ++++ glew.new/config/Makefile.mingw 2017-12-21 21:13:03.115385406 +0000 +@@ -1,8 +1,7 @@ NAME = glew32 -CC = gcc # use gcc for linking, with ld it does not work -LD = gcc -CFLAGS.SO = -DGLEW_BUILD ++LD = $(CC) +CFLAGS.SO = -DGLEW_BUILD -DSTATIC LDFLAGS.GL = -lglu32 -lopengl32 -lgdi32 -luser32 -lkernel32 LDFLAGS.EXTRA = -L/mingw/lib WARN = -Wall -W -@@ -12,9 +10,9 @@ +@@ -12,9 +11,9 @@ LIB.DEVLNK = lib$(NAME).dll.a # for mingw this is the dll import lib LIB.SHARED = $(NAME).dll LIB.STATIC = lib$(NAME).a # the static lib will be broken (see CFLAGS.SO) -LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) -+#LDFLAGS.SO = -shared -Wl,-soname,$(LIB.SONAME) -Wl,--out-implib,lib/$(LIB.DEVLNK) ++LDFLAGS.SO = -shared -Wl,--out-implib,lib/$(LIB.DEVLNK) LIB.SONAME.MX = lib$(NAME)mx.dll LIB.DEVLNK.MX = lib$(NAME)mx.dll.a # for mingw this is the dll import lib LIB.SHARED.MX = $(NAME)mx.dll LIB.STATIC.MX = lib$(NAME)mx.a # the static lib will be broken (see CFLAGS.SO) -LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX) -+#LDFLAGS.SO.MX = -shared -Wl,-soname,$(LIB.SONAME.MX) -Wl,--out-implib,lib/$(LIB.DEVLNK.MX) ++LDFLAGS.SO.MX = -shared -Wl,--out-implib,lib/$(LIB.DEVLNK.MX) --- glew/include/GL/glew.h 2011-08-25 16:17:55.000000000 +0200 +++ glew.new/include/GL/glew.h 2012-02-25 16:39:44.970410007 +0100 @@ -151,7 +151,7 @@ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
