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
|
@ -117,7 +117,7 @@ def main(ref_name):
|
|||
"TARGET": TARGET,
|
||||
"CC": CC,
|
||||
"FLAGS": [
|
||||
'DEBUG_CFLAGS="-DDEBUG_LIST"',
|
||||
'DEBUG="-DDEBUG_LIST"',
|
||||
"USE_ZLIB=1",
|
||||
"USE_OT=1",
|
||||
"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
|
||||
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
|
||||
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
|
||||
|
@ -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
|
||||
this is easily addressed using the "aix52" target. If you get build errors
|
||||
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
|
||||
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.
|
||||
OPT_CFLAGS = -O2
|
||||
|
||||
#### Debug flags (typically "-g").
|
||||
# Those flags only feed CFLAGS so it is not mandatory to use this form.
|
||||
DEBUG_CFLAGS = -g
|
||||
#### No longer used
|
||||
DEBUG_CFLAGS =
|
||||
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
|
||||
ERR =
|
||||
|
@ -453,7 +460,6 @@ ifeq ($(TARGET),aix51)
|
|||
set_target_defaults = $(call default_opts, \
|
||||
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
|
||||
DEBUG_CFLAGS =
|
||||
endif
|
||||
|
||||
# AIX 5.2
|
||||
|
@ -461,7 +467,6 @@ ifeq ($(TARGET),aix52)
|
|||
set_target_defaults = $(call default_opts, \
|
||||
USE_POLL USE_LIBCRYPT USE_OBSOLETE_LINKER)
|
||||
TARGET_CFLAGS = -D_MSGQSUPPORT
|
||||
DEBUG_CFLAGS =
|
||||
endif
|
||||
|
||||
# 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
|
||||
# (especially on archs which do not need it).
|
||||
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
|
||||
endif
|
||||
endif
|
||||
|
@ -859,10 +864,10 @@ endif
|
|||
$(collect_opts_flags)
|
||||
|
||||
#### 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 += $(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)
|
||||
|
||||
ifneq ($(VERSION)$(SUBVERS)$(EXTRAVERSION),)
|
||||
|
@ -1170,7 +1175,6 @@ opts:
|
|||
@echo -n 'OPT_CFLAGS="$(strip $(OPT_CFLAGS))" '
|
||||
@echo -n 'ARCH_FLAGS="$(strip $(ARCH_FLAGS))" '
|
||||
@echo -n 'CPU_CFLAGS="$(strip $(CPU_CFLAGS))" '
|
||||
@echo -n 'DEBUG_CFLAGS="$(strip $(DEBUG_CFLAGS))" '
|
||||
@echo -n 'STD_CFLAGS="$(strip $(STD_CFLAGS))" '
|
||||
@echo -n 'WARN_CFLAGS="$(strip $(WARN_CFLAGS))" '
|
||||
@echo -n 'NOWARN_CFLAGS="$(strip $(NOWARN_CFLAGS))" '
|
||||
|
|
Loading…
Reference in New Issue