mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
BUILD: makefile: also drop DEBUG_CFLAGS
This one is often used as a gateway to inject regular CFLAGS, even though not designed for this. It's now ignored, but any attempt at setting it reports a warning suggesting to use CFLAGS or ARCH_FLAGS instead.
This commit is contained in:
parent
de4e6e11f2
commit
ac73a23454
2
.github/matrix.py
vendored
2
.github/matrix.py
vendored
@ -117,7 +117,7 @@ def main(ref_name):
|
|||||||
"TARGET": TARGET,
|
"TARGET": TARGET,
|
||||||
"CC": CC,
|
"CC": CC,
|
||||||
"FLAGS": [
|
"FLAGS": [
|
||||||
'DEBUG_CFLAGS="-DDEBUG_LIST"',
|
'DEBUG="-DDEBUG_LIST"',
|
||||||
"USE_ZLIB=1",
|
"USE_ZLIB=1",
|
||||||
"USE_OT=1",
|
"USE_OT=1",
|
||||||
"OT_INC=${HOME}/opt-ot/include",
|
"OT_INC=${HOME}/opt-ot/include",
|
||||||
|
7
INSTALL
7
INSTALL
@ -657,11 +657,6 @@ section 4 about dependencies for more information on how to build with OpenSSL.
|
|||||||
HAProxy can compress HTTP responses to save bandwidth. Please see section 4
|
HAProxy can compress HTTP responses to save bandwidth. Please see section 4
|
||||||
about dependencies to see the available libraries and associated options.
|
about dependencies to see the available libraries and associated options.
|
||||||
|
|
||||||
By default, the DEBUG_CFLAGS variable is set to '-g' to enable debug symbols.
|
|
||||||
It is not wise to disable it on uncommon systems, because it's often the only
|
|
||||||
way to get a usable core when you need one. Otherwise, you can set DEBUG to
|
|
||||||
'-s' to strip the binary.
|
|
||||||
|
|
||||||
If the ERR variable is set to any non-empty value other than "0", then -Werror
|
If the ERR variable is set to any non-empty value other than "0", then -Werror
|
||||||
will be added to the compiler so that any build warning will trigger an error.
|
will be added to the compiler so that any build warning will trigger an error.
|
||||||
This is the recommended way to build when developing, and it is expected that
|
This is the recommended way to build when developing, and it is expected that
|
||||||
@ -775,7 +770,7 @@ also run on 5.2 or earlier, you need to build with DEFINE="-D_MSGQSUPPORT",
|
|||||||
otherwise __fd_select() will be used while not being present in the libc, but
|
otherwise __fd_select() will be used while not being present in the libc, but
|
||||||
this is easily addressed using the "aix52" target. If you get build errors
|
this is easily addressed using the "aix52" target. If you get build errors
|
||||||
because of strange symbols or section mismatches, simply remove -g from
|
because of strange symbols or section mismatches, simply remove -g from
|
||||||
DEBUG_CFLAGS.
|
ARCH_FLAGS.
|
||||||
|
|
||||||
Building on AIX 7.2 works fine using the "aix72-gcc" TARGET. It adds two
|
Building on AIX 7.2 works fine using the "aix72-gcc" TARGET. It adds two
|
||||||
special CFLAGS to prevent the loading of AIX's xmem.h and var.h. This is done
|
special CFLAGS to prevent the loading of AIX's xmem.h and var.h. This is done
|
||||||
|
22
Makefile
22
Makefile
@ -184,9 +184,16 @@ LD = $(CC)
|
|||||||
# other CFLAGS options if needed.
|
# other CFLAGS options if needed.
|
||||||
OPT_CFLAGS = -O2
|
OPT_CFLAGS = -O2
|
||||||
|
|
||||||
#### Debug flags (typically "-g").
|
#### No longer used
|
||||||
# Those flags only feed CFLAGS so it is not mandatory to use this form.
|
DEBUG_CFLAGS =
|
||||||
DEBUG_CFLAGS = -g
|
ifneq ($(DEBUG_CFLAGS),)
|
||||||
|
$(warning Warning: DEBUG_CFLAGS was forced to "$(DEBUG_CFLAGS)" but is no \
|
||||||
|
longer used and will be ignored. If you have ported this build setting from \
|
||||||
|
and older version, it is likely that you just want to pass these options \
|
||||||
|
to the CFLAGS variable. If you are passing some debugging-related options \
|
||||||
|
such as -g/-ggdb3/-pg etc, they can now be passed in ARCH_FLAGS at once for \
|
||||||
|
both the compilation and linking stages.)
|
||||||
|
endif
|
||||||
|
|
||||||
#### Add -Werror when set to non-empty
|
#### Add -Werror when set to non-empty
|
||||||
ERR =
|
ERR =
|
||||||
@ -453,7 +460,6 @@ ifeq ($(TARGET),aix51)
|
|||||||
set_target_defaults = $(call default_opts, \
|
set_target_defaults = $(call default_opts, \
|
||||||
USE_POLL USE_LIBCRYPT USE_OBSOLETE_LINKER)
|
USE_POLL USE_LIBCRYPT USE_OBSOLETE_LINKER)
|
||||||
TARGET_CFLAGS = -Dss_family=__ss_family -Dip6_hdr=ip6hdr -DSTEVENS_API -D_LINUX_SOURCE_COMPAT -Dunsetenv=my_unsetenv
|
TARGET_CFLAGS = -Dss_family=__ss_family -Dip6_hdr=ip6hdr -DSTEVENS_API -D_LINUX_SOURCE_COMPAT -Dunsetenv=my_unsetenv
|
||||||
DEBUG_CFLAGS =
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# AIX 5.2
|
# AIX 5.2
|
||||||
@ -461,7 +467,6 @@ ifeq ($(TARGET),aix52)
|
|||||||
set_target_defaults = $(call default_opts, \
|
set_target_defaults = $(call default_opts, \
|
||||||
USE_POLL USE_LIBCRYPT USE_OBSOLETE_LINKER)
|
USE_POLL USE_LIBCRYPT USE_OBSOLETE_LINKER)
|
||||||
TARGET_CFLAGS = -D_MSGQSUPPORT
|
TARGET_CFLAGS = -D_MSGQSUPPORT
|
||||||
DEBUG_CFLAGS =
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# AIX 7.2 and above
|
# AIX 7.2 and above
|
||||||
@ -490,7 +495,7 @@ $(set_target_defaults)
|
|||||||
# linking with it by default as it's not always available nor deployed
|
# linking with it by default as it's not always available nor deployed
|
||||||
# (especially on archs which do not need it).
|
# (especially on archs which do not need it).
|
||||||
ifneq ($(USE_THREAD:0=),)
|
ifneq ($(USE_THREAD:0=),)
|
||||||
ifneq ($(shell $(CC) $(OPT_CFLAGS) $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS) $(STD_CFLAGS) $(WARN_CFLAGS) $(NOWARN_CFLAGS) $(ERROR_CFLAGS) $(CFLAGS) -dM -E -xc - </dev/null 2>/dev/null | grep -c 'LOCK_FREE.*1'),0)
|
ifneq ($(shell $(CC) $(OPT_CFLAGS) $(ARCH_FLAGS) $(CPU_CFLAGS) $(STD_CFLAGS) $(WARN_CFLAGS) $(NOWARN_CFLAGS) $(ERROR_CFLAGS) $(CFLAGS) -dM -E -xc - </dev/null 2>/dev/null | grep -c 'LOCK_FREE.*1'),0)
|
||||||
USE_LIBATOMIC = implicit
|
USE_LIBATOMIC = implicit
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -859,10 +864,10 @@ endif
|
|||||||
$(collect_opts_flags)
|
$(collect_opts_flags)
|
||||||
|
|
||||||
#### Global compile options
|
#### Global compile options
|
||||||
VERBOSE_CFLAGS = $(OPT_CFLAGS) $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS) $(STD_CFLAGS) $(TARGET_CFLAGS) $(CFLAGS) $(DEFINE)
|
VERBOSE_CFLAGS = $(OPT_CFLAGS) $(ARCH_FLAGS) $(CPU_CFLAGS) $(STD_CFLAGS) $(TARGET_CFLAGS) $(CFLAGS) $(DEFINE)
|
||||||
COPTS = -Iinclude
|
COPTS = -Iinclude
|
||||||
|
|
||||||
COPTS += $(OPT_CFLAGS) $(ARCH_FLAGS) $(CPU_CFLAGS) $(DEBUG_CFLAGS) $(STD_CFLAGS) $(WARN_CFLAGS) $(NOWARN_CFLAGS) $(ERROR_CFLAGS) $(TARGET_CFLAGS) $(DEFINE) $(SILENT_DEFINE)
|
COPTS += $(OPT_CFLAGS) $(ARCH_FLAGS) $(CPU_CFLAGS) $(STD_CFLAGS) $(WARN_CFLAGS) $(NOWARN_CFLAGS) $(ERROR_CFLAGS) $(TARGET_CFLAGS) $(DEFINE) $(SILENT_DEFINE)
|
||||||
COPTS += $(DEBUG) $(OPTIONS_CFLAGS) $(CFLAGS) $(ADDINC)
|
COPTS += $(DEBUG) $(OPTIONS_CFLAGS) $(CFLAGS) $(ADDINC)
|
||||||
|
|
||||||
ifneq ($(VERSION)$(SUBVERS)$(EXTRAVERSION),)
|
ifneq ($(VERSION)$(SUBVERS)$(EXTRAVERSION),)
|
||||||
@ -1170,7 +1175,6 @@ opts:
|
|||||||
@echo -n 'OPT_CFLAGS="$(strip $(OPT_CFLAGS))" '
|
@echo -n 'OPT_CFLAGS="$(strip $(OPT_CFLAGS))" '
|
||||||
@echo -n 'ARCH_FLAGS="$(strip $(ARCH_FLAGS))" '
|
@echo -n 'ARCH_FLAGS="$(strip $(ARCH_FLAGS))" '
|
||||||
@echo -n 'CPU_CFLAGS="$(strip $(CPU_CFLAGS))" '
|
@echo -n 'CPU_CFLAGS="$(strip $(CPU_CFLAGS))" '
|
||||||
@echo -n 'DEBUG_CFLAGS="$(strip $(DEBUG_CFLAGS))" '
|
|
||||||
@echo -n 'STD_CFLAGS="$(strip $(STD_CFLAGS))" '
|
@echo -n 'STD_CFLAGS="$(strip $(STD_CFLAGS))" '
|
||||||
@echo -n 'WARN_CFLAGS="$(strip $(WARN_CFLAGS))" '
|
@echo -n 'WARN_CFLAGS="$(strip $(WARN_CFLAGS))" '
|
||||||
@echo -n 'NOWARN_CFLAGS="$(strip $(NOWARN_CFLAGS))" '
|
@echo -n 'NOWARN_CFLAGS="$(strip $(NOWARN_CFLAGS))" '
|
||||||
|
Loading…
Reference in New Issue
Block a user