[vlc-devel] [PATCH] contrib: make sure the debug flags are always set in the global CFLAGS
Steve Lhomme
robux4 at ycbcr.xyz
Tue Jul 23 12:45:55 CEST 2019
They are not supported by Meson but the CFLAGS but the global flags are used
in some contribs to add extra local flags. We would miss these flags otherwise.
---
contrib/src/main.mak | 44 +++++++++++++++++++++++---------------------
1 file changed, 23 insertions(+), 21 deletions(-)
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 0f805e293d..e2935c09b3 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -191,12 +191,6 @@ CFLAGS := $(CFLAGS) -gcodeview
CXXFLAGS := $(CXXFLAGS) -gcodeview
endif
-ifndef WITH_OPTIMIZATION
-DBGOPTIMFLAGS = -g -O0
-else
-DBGOPTIMFLAGS = -g -O2
-endif
-
# Do not export those! Use HOSTVARS.
# Do the FPU detection, after we have figured out our compilers and flags.
@@ -311,21 +305,6 @@ HOSTCONF += --with-pic
PIC := -fPIC
endif
-HOSTTOOLS := \
- CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \
- AR="$(AR)" CCAS="$(CCAS)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
- PATH="$(PREFIX)/bin:$(PATH)"
-HOSTVARS := $(HOSTTOOLS) \
- CPPFLAGS="$(CPPFLAGS)" \
- CFLAGS="$(CFLAGS) $(DBGOPTIMFLAGS)" \
- CXXFLAGS="$(CXXFLAGS) $(DBGOPTIMFLAGS)" \
- LDFLAGS="$(LDFLAGS)"
-HOSTVARS_PIC := $(HOSTTOOLS) \
- CPPFLAGS="$(CPPFLAGS) $(PIC)" \
- CFLAGS="$(CFLAGS) $(DBGOPTIMFLAGS) $(PIC)" \
- CXXFLAGS="$(CXXFLAGS) $(DBGOPTIMFLAGS) $(PIC)" \
- LDFLAGS="$(LDFLAGS)"
-
# For cross-compilation with meson, do not set compiler and flags
# in HOSTVARS as meson will always use them for the BUILD machine compiler!
ifdef HAVE_CROSS_COMPILE
@@ -338,6 +317,29 @@ HOSTVARS_MESON := $(HOSTTOOLS) \
LDFLAGS="$(LDFLAGS)"
endif
+ifndef WITH_OPTIMIZATION
+CFLAGS := $(CFLAGS) -g -O0
+CXXFLAGS := $(CXXFLAGS) -g -O0
+else
+CFLAGS := $(CFLAGS) -g -O2
+CXXFLAGS := $(CXXFLAGS) -g -O2
+endif
+
+HOSTTOOLS := \
+ CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \
+ AR="$(AR)" CCAS="$(CCAS)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
+ PATH="$(PREFIX)/bin:$(PATH)"
+HOSTVARS := $(HOSTTOOLS) \
+ CPPFLAGS="$(CPPFLAGS)" \
+ CFLAGS="$(CFLAGS)" \
+ CXXFLAGS="$(CXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS)"
+HOSTVARS_PIC := $(HOSTTOOLS) \
+ CPPFLAGS="$(CPPFLAGS) $(PIC)" \
+ CFLAGS="$(CFLAGS) $(PIC)" \
+ CXXFLAGS="$(CXXFLAGS) $(PIC)" \
+ LDFLAGS="$(LDFLAGS)"
+
download_git = \
rm -Rf -- "$(@:.tar.xz=)" && \
$(GIT) init --bare "$(@:.tar.xz=)" && \
--
2.17.1
More information about the vlc-devel
mailing list