configure: Set a default LINKFLAGS in addition to LDFLAGS.

The former is passed to the compiler when linking using it,
the latter is passed to ld when it is invoked directly.

Also modify ArchitectureRules to not overwrite this setting.
This commit is contained in:
Augustin Cavalier
2018-08-15 14:19:30 -04:00
parent 63cb446249
commit 252e4f6299
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -70,10 +70,10 @@ rule ArchitectureSetup architecture
# initial state for flags etc. # initial state for flags etc.
HAIKU_C++_$(architecture) ?= $(HAIKU_CC_$(architecture)) ; HAIKU_C++_$(architecture) ?= $(HAIKU_CC_$(architecture)) ;
HAIKU_LINK_$(architecture) = $(HAIKU_CC_$(architecture)) ; HAIKU_LINK_$(architecture) = $(HAIKU_CC_$(architecture)) ;
HAIKU_LINKFLAGS_$(architecture) = $(ccBaseFlags) ;
HAIKU_CCFLAGS_$(architecture) += $(ccBaseFlags) -nostdinc ; HAIKU_CCFLAGS_$(architecture) += $(ccBaseFlags) -nostdinc ;
HAIKU_C++FLAGS_$(architecture) += $(ccBaseFlags) -nostdinc ; HAIKU_C++FLAGS_$(architecture) += $(ccBaseFlags) -nostdinc ;
HAIKU_LINKFLAGS_$(architecture) += $(ccBaseFlags) ;
HAIKU_ASFLAGS_$(architecture) += $(archFlags) -nostdinc ; HAIKU_ASFLAGS_$(architecture) += $(archFlags) -nostdinc ;
# strip is required # strip is required
Vendored
+4
View File
@@ -110,6 +110,8 @@ environment variables:
Defaults to "". Defaults to "".
HAIKU_CXXFLAGS_<arch> The C++ flags for target architecture <arch>. HAIKU_CXXFLAGS_<arch> The C++ flags for target architecture <arch>.
Defaults to "". Defaults to "".
HAIKU_LINKFLAGS_<arch> The flags passed to the compiler when linking for
target architecture <arch>. Defaults to "".
HAIKU_LDFLAGS_<arch> The linker flags for target architecture <arch>. HAIKU_LDFLAGS_<arch> The linker flags for target architecture <arch>.
Defaults to "". Defaults to "".
HAIKU_ARFLAGS_<arch> The flags passed to HAIKU_AR for target HAIKU_ARFLAGS_<arch> The flags passed to HAIKU_AR for target
@@ -945,6 +947,7 @@ else
set_default_value HAIKU_CPPFLAGS_$targetArch "" set_default_value HAIKU_CPPFLAGS_$targetArch ""
set_default_value HAIKU_CCFLAGS_$targetArch "" set_default_value HAIKU_CCFLAGS_$targetArch ""
set_default_value HAIKU_CXXFLAGS_$targetArch "" set_default_value HAIKU_CXXFLAGS_$targetArch ""
set_default_value HAIKU_LINKFLAGS_$targetArch ""
set_default_value HAIKU_LDFLAGS_$targetArch "" set_default_value HAIKU_LDFLAGS_$targetArch ""
set_default_value HAIKU_ARFLAGS_$targetArch cru set_default_value HAIKU_ARFLAGS_$targetArch cru
set_default_value HAIKU_UNARFLAGS_$targetArch x set_default_value HAIKU_UNARFLAGS_$targetArch x
@@ -1053,6 +1056,7 @@ for targetArch in $HAIKU_PACKAGING_ARCHS; do
HAIKU_CPPFLAGS HAIKU_CPPFLAGS HAIKU_CPPFLAGS HAIKU_CPPFLAGS
HAIKU_CCFLAGS HAIKU_CCFLAGS HAIKU_CCFLAGS HAIKU_CCFLAGS
HAIKU_C++FLAGS HAIKU_CXXFLAGS HAIKU_C++FLAGS HAIKU_CXXFLAGS
HAIKU_LINKFLAGS HAIKU_LINKFLAGS
HAIKU_LDFLAGS HAIKU_LDFLAGS HAIKU_LDFLAGS HAIKU_LDFLAGS
HAIKU_ARFLAGS HAIKU_ARFLAGS HAIKU_ARFLAGS HAIKU_ARFLAGS
HAIKU_UNARFLAGS HAIKU_UNARFLAGS HAIKU_UNARFLAGS HAIKU_UNARFLAGS