[vlc-devel] [PATCH 1/4] contrib: add an option to disable generating debug information
Rémi Denis-Courmont
remi at remlab.net
Mon May 20 14:12:06 CEST 2019
Hi,
Typically --enable-debug is to generate self-debugging code such as asserts, not debug symbols. Symbols are generated by default and stripped (or not) at install.
Le 20 mai 2019 12:23:55 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>By default debug information is generated
>---
> contrib/bootstrap | 6 ++++++
> contrib/src/main.mak | 9 +++++++--
> 2 files changed, 13 insertions(+), 2 deletions(-)
>
>diff --git a/contrib/bootstrap b/contrib/bootstrap
>index 96c59f71fa..547fe3afd6 100755
>--- a/contrib/bootstrap
>+++ b/contrib/bootstrap
>@@ -35,6 +35,7 @@ usage()
> echo " --enable-ad-clauses configure to build packages with
>advertising clauses"
> echo " (USE AT YOUR OWN LEGAL RISKS)"
> echo " --disable-optim disable optimization in libraries"
>+ echo " --disable-debug disable generating debug information"
> }
>
> BUILD=
>@@ -49,6 +50,7 @@ GPL="1"
> GNUV3="1"
> AD_CLAUSES=
> WITH_OPTIMIZATION="1"
>+HAVE_DEBUG="1"
>
> if test ! -f "../../contrib/src/main.mak"
> then
>@@ -84,6 +86,9 @@ do
> --disable-optim)
> WITH_OPTIMIZATION=
> ;;
>+ --disable-debug)
>+ HAVE_DEBUG=
>+ ;;
> --enable-small)
> ENABLE_SMALL=1
> ;;
>@@ -265,6 +270,7 @@ test -z "$GPL" || add_make_enabled "GPL"
> test -z "$GNUV3" || add_make_enabled "GNUV3"
> test -z "$AD_CLAUSES" || add_make_enabled "AD_CLAUSES"
> test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
>+test -z "$HAVE_DEBUG" || add_make_enabled "HAVE_DEBUG"
>test "`uname -o 2>/dev/null`" != "Msys" || add_make "CMAKE_GENERATOR :=
>-G \"MSYS Makefiles\""
>
> #
>diff --git a/contrib/src/main.mak b/contrib/src/main.mak
>index 30a5e1f03a..3868ea8fac 100644
>--- a/contrib/src/main.mak
>+++ b/contrib/src/main.mak
>@@ -185,10 +185,15 @@ cppcheck = $(shell $(CC) $(CFLAGS) -E -dM - <
>/dev/null | grep -E $(1))
>
> EXTRA_CFLAGS += -I$(PREFIX)/include
> CPPFLAGS := $(CPPFLAGS) $(EXTRA_CFLAGS)
>-CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS) -g
>-CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) $(EXTRA_CXXFLAGS) -g
>+CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS)
>+CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) $(EXTRA_CXXFLAGS)
> LDFLAGS := $(LDFLAGS) -L$(PREFIX)/lib $(EXTRA_LDFLAGS)
>
>+ifdef HAVE_DEBUG
>+CFLAGS := $(CFLAGS) -g
>+CXXFLAGS := $(CXXFLAGS) -g
>+endif
>+
> ifndef WITH_OPTIMIZATION
> CFLAGS := $(CFLAGS) -O0
> CXXFLAGS := $(CXXFLAGS) -O0
>--
>2.17.1
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190520/8c05e72a/attachment.html>
More information about the vlc-devel
mailing list