aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure b/configure
index c4203f5..e504bcb 100755
--- a/configure
+++ b/configure
@@ -41,11 +41,6 @@ if [ "$host" != "$target" ] ; then
toolprefix=$target-
fi
-: ${DEFAULT_PREPROCESSOR:=${toolprefix}cpp}
-: ${DEFAULT_QBE:=qbe}
-: ${DEFAULT_ASSEMBLER:=${toolprefix}as}
-: ${DEFAULT_LINKER:=${toolprefix}ld}
-
case "$target" in
x86_64*|amd64*) qbetarget=amd64_sysv ;;
aarch64*) qbetarget=arm64 ;;
@@ -110,6 +105,7 @@ case "$target" in
;;
*-*openbsd*)
: ${DEFAULT_DYNAMIC_LINKER:=/usr/libexec/ld.so}
+ test "$host" = "$target" && : ${DEFAULT_PREPROCESSOR:=/usr/libexec/cpp}
startfiles='"-l", ":crt0.o", "-l", ":crtbegin.o"'
endfiles='"-l", "c", "-l", ":crtend.o"'
linkflags='"-L", "/usr/lib",'
@@ -118,6 +114,11 @@ case "$target" in
fail "unknown target '$target', please create config.h manually"
esac
+: ${DEFAULT_PREPROCESSOR:=${toolprefix}cpp}
+: ${DEFAULT_QBE:=qbe}
+: ${DEFAULT_ASSEMBLER:=${toolprefix}as}
+: ${DEFAULT_LINKER:=${toolprefix}ld}
+
test "$DEFAULT_DYNAMIC_LINKER" && linkflags=$linkflags' "--dynamic-linker", "'$DEFAULT_DYNAMIC_LINKER'"'
printf "creating config.h... "