makepkg: Add support for specifying LDFLAGS
Provide support for specifying LDFLAGS within makepkg.conf but leaves this undefined by default. Fixes FS#12542. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
8f26bb9052
commit
1cc8ad6112
3 changed files with 7 additions and 1 deletions
|
@ -61,6 +61,11 @@ Options
|
||||||
**CXXFLAGS=**"cxxflags"::
|
**CXXFLAGS=**"cxxflags"::
|
||||||
Flags used for the C++ compiler; see CFLAGS for more info.
|
Flags used for the C++ compiler; see CFLAGS for more info.
|
||||||
|
|
||||||
|
**LDFLAGS=**"ldflags"::
|
||||||
|
Flags used for the linker. Several options may be specified with common
|
||||||
|
usage resembling ``-Wl,--hash-style=gnu``. Read ld(1) for more details on
|
||||||
|
available linker flags.
|
||||||
|
|
||||||
**MAKEFLAGS=**"makeflags"::
|
**MAKEFLAGS=**"makeflags"::
|
||||||
This is often used to set the number of jobs used, for example, `-j2`.
|
This is often used to set the number of jobs used, for example, `-j2`.
|
||||||
Other flags that make accepts can also be passed.
|
Other flags that make accepts can also be passed.
|
||||||
|
|
|
@ -31,6 +31,7 @@ CHOST="@CHOST@"
|
||||||
# -mtune optimizes for an architecture, but builds for whole processor family
|
# -mtune optimizes for an architecture, but builds for whole processor family
|
||||||
CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
|
CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
|
||||||
CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
|
CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
|
||||||
|
#LDFLAGS=""
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
|
|
||||||
|
|
|
@ -674,7 +674,7 @@ run_build() {
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
|
|
||||||
# ensure all necessary build variables are exported
|
# ensure all necessary build variables are exported
|
||||||
export CFLAGS CXXFLAGS MAKEFLAGS CHOST
|
export CFLAGS CXXFLAGS MAKEFLAGS LDFLAGS CHOST
|
||||||
# save our shell options so build() can't override what we need
|
# save our shell options so build() can't override what we need
|
||||||
local shellopts=$(shopt -p)
|
local shellopts=$(shopt -p)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue