From 1ae3bd6c70ca6965483bab880dfdece1c9edcebd Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 8 Sep 2020 16:57:48 -0500 Subject: [PATCH] Add warnings to CONFIG_SITE files that can't override gnuCommon Move the clang and '-g' suggestions to the right places --- configure/os/CONFIG_SITE.Common.cygwin-x86 | 6 ++++++ configure/os/CONFIG_SITE.Common.cygwin-x86_64 | 10 ++++------ configure/os/CONFIG_SITE.Common.linux-aarch64 | 6 ++++++ configure/os/CONFIG_SITE.Common.linux-arm | 9 +++++++++ configure/os/CONFIG_SITE.Common.linux-x86 | 15 +++++---------- configure/os/CONFIG_SITE.Common.linux-x86_64 | 12 ++++-------- configure/os/CONFIG_SITE.Common.linuxCommon | 11 +++++------ configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 | 8 ++++++++ configure/os/CONFIG_SITE.linux-x86.linux-x86 | 14 ++++++++++++++ .../os/CONFIG_SITE.linux-x86_64.linux-x86_64 | 13 +++++++++++++ 10 files changed, 74 insertions(+), 30 deletions(-) diff --git a/configure/os/CONFIG_SITE.Common.cygwin-x86 b/configure/os/CONFIG_SITE.Common.cygwin-x86 index eae9ee5dd..e346c3475 100644 --- a/configure/os/CONFIG_SITE.Common.cygwin-x86 +++ b/configure/os/CONFIG_SITE.Common.cygwin-x86 @@ -16,3 +16,9 @@ COMMANDLINE_LIBRARY = READLINE_NCURSESW # No other libraries needed #COMMANDLINE_LIBRARY = READLINE + + +# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be +# overridden in this file for native builds, e.g. variables such as +# OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS +# They must be set in CONFIG_SITE.cygwin-x86.cygwin-x86 instead. diff --git a/configure/os/CONFIG_SITE.Common.cygwin-x86_64 b/configure/os/CONFIG_SITE.Common.cygwin-x86_64 index 8d318e04e..8c549fe9b 100644 --- a/configure/os/CONFIG_SITE.Common.cygwin-x86_64 +++ b/configure/os/CONFIG_SITE.Common.cygwin-x86_64 @@ -11,10 +11,8 @@ #LDLIBS_READLINE = -lreadline -lcurses -# It makes sense to include debugging symbols even in optimized builds -# in case you want to attach gdb to the process or examine a core-dump. -# This does cost disk space, but not memory as debug symbols are not -# loaded into RAM when the binary is loaded. -OPT_CFLAGS_YES += -g -OPT_CXXFLAGS_YES += -g +# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be +# overridden in this file for native builds, e.g. variables such as +# OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS +# They must be set in CONFIG_SITE.cygwin-x86_64.cygwin-x86_64 instead. diff --git a/configure/os/CONFIG_SITE.Common.linux-aarch64 b/configure/os/CONFIG_SITE.Common.linux-aarch64 index a0e540d7c..5c34e9e10 100644 --- a/configure/os/CONFIG_SITE.Common.linux-aarch64 +++ b/configure/os/CONFIG_SITE.Common.linux-aarch64 @@ -30,3 +30,9 @@ # Needs -lcurses (older versions) #COMMANDLINE_LIBRARY = READLINE_CURSES + +# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be +# overridden in this file for native builds, e.g. variables such as +# OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS +# They must be set in CONFIG_SITE.linux-aarch64.linux-aarch64 instead. + diff --git a/configure/os/CONFIG_SITE.Common.linux-arm b/configure/os/CONFIG_SITE.Common.linux-arm index 8f5fb8c82..90f792cde 100644 --- a/configure/os/CONFIG_SITE.Common.linux-arm +++ b/configure/os/CONFIG_SITE.Common.linux-arm @@ -33,3 +33,12 @@ COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \ # Readline is broken or you don't want use it: #COMMANDLINE_LIBRARY = EPICS + + +# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be +# overridden in this file for native builds, e.g. variables such as +# OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS +# They must be set in CONFIG_SITE.linux-arm.linux-arm instead. + +# Permit access to 64-bit file-systems +OP_SYS_CFLAGS += -D_FILE_OFFSET_BITS=64 diff --git a/configure/os/CONFIG_SITE.Common.linux-x86 b/configure/os/CONFIG_SITE.Common.linux-x86 index d243dae48..ae779c265 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86 +++ b/configure/os/CONFIG_SITE.Common.linux-x86 @@ -34,22 +34,17 @@ COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \ #COMMANDLINE_LIBRARY = EPICS +# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be +# overridden in this file for native builds, e.g. variables such as +# OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS +# They must be set in CONFIG_SITE.linux-x86.linux-x86 instead. + # Permit access to 64-bit file-systems OP_SYS_CFLAGS += -D_FILE_OFFSET_BITS=64 - -# Uncomment the followings lines to build with CLANG instead of GCC. -# -#GNU = NO -#CMPLR_CLASS = clang -#CC = clang -#CCC = clang++ - - # Tune GNU compiler output for a specific 32-bit cpu-type # (e.g. generic, native, i386, i686, pentium2/3/4, prescott, k6, athlon etc.) GNU_TUNE_CFLAGS = -mtune=generic - # Developers using a suitable compiler may enable its address sanitizer: #ENABLE_ASAN = YES diff --git a/configure/os/CONFIG_SITE.Common.linux-x86_64 b/configure/os/CONFIG_SITE.Common.linux-x86_64 index 834da1e5a..e098b7601 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86_64 +++ b/configure/os/CONFIG_SITE.Common.linux-x86_64 @@ -34,18 +34,14 @@ COMMANDLINE_LIBRARY = $(strip $(if $(wildcard \ #COMMANDLINE_LIBRARY = EPICS -# Uncomment the followings lines to build with CLANG instead of GCC. -# -#GNU = NO -#CMPLR_CLASS = clang -#CC = clang -#CCC = clang++ - +# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be +# overridden in this file for native builds, e.g. variables such as +# OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS +# They must be set in CONFIG_SITE.linux-x86_64.linux-x86_64 instead. # Tune GNU compiler output for a specific 64-bit cpu-type # (e.g. generic, native, core2, nocona, k8, opteron, athlon64, barcelona etc.) GNU_TUNE_CFLAGS = -mtune=generic - # Developers using a suitable compiler may enable its address sanitizer: #ENABLE_ASAN = YES diff --git a/configure/os/CONFIG_SITE.Common.linuxCommon b/configure/os/CONFIG_SITE.Common.linuxCommon index 7f5d4aa11..2b035eac9 100644 --- a/configure/os/CONFIG_SITE.Common.linuxCommon +++ b/configure/os/CONFIG_SITE.Common.linuxCommon @@ -2,10 +2,9 @@ # # Site-specific settings for all linux targets +# WARNING: Variables that are set in $(CONFIG)/CONFIG.gnuCommon cannot be +# overridden in this file for native builds, e.g. variables such as +# OPT_CFLAGS_YES, WARN_CFLAGS, SHRLIB_LDFLAGS +# They must be set in the host+target specific file instead: +# CONFIG_SITE.. -# It makes sense to include debugging symbols even in optimized builds -# in case you want to attach gdb to the process or examine a core-dump. -# This does cost disk space, but not memory as debug symbols are not -# loaded into RAM when the binary is loaded. -OPT_CFLAGS_YES += -g -OPT_CXXFLAGS_YES += -g diff --git a/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 b/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 index 3125c7a64..46a1eccea 100644 --- a/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 +++ b/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 @@ -6,3 +6,11 @@ # GNU_DIR used when COMMANDLINE_LIBRARY is READLINE #GNU_DIR=C:/cygwin + +# It makes sense to include debugging symbols even in optimized builds +# in case you want to attach gdb to the process or examine a core-dump. +# This does cost disk space, but not memory as debug symbols are not +# loaded into RAM when the binary is loaded. +OPT_CFLAGS_YES += -g +OPT_CXXFLAGS_YES += -g + diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-x86 b/configure/os/CONFIG_SITE.linux-x86.linux-x86 index d359d174f..5b2fa7c65 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-x86 +++ b/configure/os/CONFIG_SITE.linux-x86.linux-x86 @@ -3,3 +3,17 @@ # Site specific definitions for linux-x86 host - linux-x86 target builds #------------------------------------------------------- +# It makes sense to include debugging symbols even in optimized builds +# in case you want to attach gdb to the process or examine a core-dump. +# This does cost disk space, but not memory as debug symbols are not +# loaded into RAM when the binary is loaded. +OPT_CFLAGS_YES += -g +OPT_CXXFLAGS_YES += -g + +# Uncomment the followings lines to build with CLANG instead of GCC. +# +#GNU = NO +#CMPLR_CLASS = clang +#CC = clang +#CCC = clang++ + diff --git a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 index 7a19d0dfe..9178afd43 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 +++ b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 @@ -3,4 +3,17 @@ # Site specific definitions for linux-x86_64 host - linux-x86_64 target builds #------------------------------------------------------- +# It makes sense to include debugging symbols even in optimized builds +# in case you want to attach gdb to the process or examine a core-dump. +# This does cost disk space, but not memory as debug symbols are not +# loaded into RAM when the binary is loaded. +OPT_CFLAGS_YES += -g +OPT_CXXFLAGS_YES += -g + +# Uncomment the followings lines to build with CLANG instead of GCC. +# +#GNU = NO +#CMPLR_CLASS = clang +#CC = clang +#CCC = clang++