summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2009-01-01 18:32:05 +0100
committerDan McGee <dan@archlinux.org>2009-01-03 07:17:15 +0100
commit1cc8ad6112ed07a71f356a6bb0f06f117b36b3b2 (patch)
tree8d20f9f4c643fc35f3a2b16b7f5bfb994d854d8e
parent8f26bb9052fe1bb131d2062da4fcd917fc9ad4da (diff)
downloadpacman-1cc8ad6112ed07a71f356a6bb0f06f117b36b3b2.tar.gz
pacman-1cc8ad6112ed07a71f356a6bb0f06f117b36b3b2.tar.xz
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>
-rw-r--r--doc/makepkg.conf.5.txt5
-rw-r--r--etc/makepkg.conf.in1
-rw-r--r--scripts/makepkg.sh.in2
3 files changed, 7 insertions, 1 deletions
diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt
index 8b3665b0..044c69ea 100644
--- a/doc/makepkg.conf.5.txt
+++ b/doc/makepkg.conf.5.txt
@@ -61,6 +61,11 @@ Options
**CXXFLAGS=**"cxxflags"::
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"::
This is often used to set the number of jobs used, for example, `-j2`.
Other flags that make accepts can also be passed.
diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in
index 9872d5df..675e5f9b 100644
--- a/etc/makepkg.conf.in
+++ b/etc/makepkg.conf.in
@@ -31,6 +31,7 @@ CHOST="@CHOST@"
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
CXXFLAGS="@CARCHFLAGS@-mtune=generic -O2 -pipe"
+#LDFLAGS=""
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 14e18dc3..3e0781f5 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -674,7 +674,7 @@ run_build() {
cd "$srcdir"
# 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
local shellopts=$(shopt -p)