[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: configure: only use -static-libgcc if the C++ compiler accepts it

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Wed Jun 12 13:45:27 UTC 2024



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
41c9458d by Steve Lhomme at 2024-06-12T13:06:52+00:00
configure: only use -static-libgcc if the C++ compiler accepts it

newer clang reports that it ignores the command on each C++ file compiled.
In the end the static C++ compiler is used on Windows anyway.

(cherry picked from commit 8ddd2bdd963fd3ace52e7bf24968238b6cddf80a)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -
f3105733 by Steve Lhomme at 2024-06-12T13:06:52+00:00
configure: don't pass -gcodeview to the linker

CFLAGS is added to the linker flags and newer LLVM don't like that.
CPPFLAGS is used during C compilation and C++ but not added to LDFLAGS.

(cherry picked from commit b700021569c1f16f63c86a9ccd912cfdc7126f41)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


1 changed file:

- configure.ac


Changes:

=====================================
configure.ac
=====================================
@@ -219,7 +219,9 @@ case "${host_os}" in
   *mingw32* | *cygwin* | *wince* | *mingwce*)
     dnl Force libtool to not link to (shared) libgcc_s when detecting C++ dependencies
     dnl When doing this test with -static-libgcc it will link on (static) libgcc_eh
-    CXXFLAGS="${CXXFLAGS} -static-libgcc"
+    AC_LANG_PUSH(C++)
+    AX_APPEND_COMPILE_FLAGS([-static-libgcc], [CXXFLAGS], [-Werror])
+    AC_LANG_POP(C++)
     AC_CHECK_TOOL(WINDRES, windres, :)
     AC_CHECK_TOOL(OBJCOPY, objcopy, :)
     AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
@@ -355,8 +357,7 @@ AC_ARG_ENABLE([pdb],
 AS_IF([test "${SYS}" = "mingw32"],[
   AS_IF([test "${enable_pdb}" = "yes"], [
     vlc_build_pdb=1
-    AX_APPEND_FLAG([-g -gcodeview],[CFLAGS])
-    AX_APPEND_FLAG([-g -gcodeview],[CXXFLAGS])
+    AX_APPEND_FLAG([-g -gcodeview],[CPPFLAGS])
     LDFLAGS="${LDFLAGS} -Wl,-pdb="
   ],[])
 ])



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/656a0f6dce1dce14d27e4dd03cef0e7778d2e136...f3105733322f8135221cb1fff210c8ca450d22f2

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/656a0f6dce1dce14d27e4dd03cef0e7778d2e136...f3105733322f8135221cb1fff210c8ca450d22f2
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list