summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2018-12-23 17:15:41 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2018-12-23 17:22:44 +0300
commit8274623093665a66ad279ea314d1700bcc6b04e3 (patch)
tree5d8e981ce56e001e5a9998944f714b4ab779a2b6
parent26191f845a618a1c0b8313cb4e6ec25b6390973f (diff)
downloadnasm-8274623093665a66ad279ea314d1700bcc6b04e3.tar.gz
build: Add missing PA_ADD_LDFLAGS helper
Fixes b0121dc312a83ab4912769e36c9f2cbe9493545d Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--autoconf/m4/pa_add_ldflags.m49
-rw-r--r--configure.ac2
2 files changed, 10 insertions, 1 deletions
diff --git a/autoconf/m4/pa_add_ldflags.m4 b/autoconf/m4/pa_add_ldflags.m4
new file mode 100644
index 00000000..0a80d348
--- /dev/null
+++ b/autoconf/m4/pa_add_ldflags.m4
@@ -0,0 +1,9 @@
+dnl --------------------------------------------------------------------------
+dnl PA_ADD_LDFLAGS(variable, flag [,actual_flag])
+dnl
+dnl Attempt to add the given option to xFLAGS, if it doesn't break
+dnl compilation. If the option to be tested is different than the
+dnl option that should actually be added, add the option to be
+dnl actually added as a second argument.
+dnl --------------------------------------------------------------------------
+AC_DEFUN([PA_ADD_LDFLAGS], [PA_ADD_FLAGS(LDFLAGS, [$1], [$2])])
diff --git a/configure.ac b/configure.ac
index 1645ad4d..2ab74ed0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,7 +233,7 @@ dnl
dnl support function sections (if available)
dnl
PA_ARG_DISABLED([sections],
- [don't try to compile with function/data section support],
+ [do not try to compile with function/data section support],
[],
[PA_ADD_CFLAGS([-ffunction-sections])
PA_ADD_CFLAGS([-fdata-sections])