diff options
| author | 2026-03-21 08:58:49 +0100 | |
|---|---|---|
| committer | 2026-03-21 08:58:49 +0100 | |
| commit | 3748a221ee50b99b1f1727497b86bbd3c123e5d1 (patch) | |
| tree | 43805bd1fc024b72f08dd63f95ae386bada13aca /configure | |
| parent | 8611099d1ef5a6230f6c33d95f1ac3a6cdb83a3c (diff) | |
Tweak configure & driver, fallback to cc
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -55,8 +55,8 @@ fi : ${linker:=ld} test -n "$host" || die "cannot determine host" -host_arch= -host_os= +host_arch=unk +host_os=unk host_abi=none host_predefs= @@ -78,6 +78,8 @@ findgcclibdir () { fi } +link_with_cc=0 + case "$host" in *-linux-*gnu*) host_os=linux @@ -131,7 +133,8 @@ case "$host" in ' ;; *) - die "unknown/unsupported target '$host'" + link_with_cc=1 + echo "warning: unknown/unsupported target '$host'" >&2 esac echo dynamic linker: $DYNAMIC_LINKER @@ -180,6 +183,10 @@ echo using os: "$host_os" echo using abi: "$host_abi" echo host include paths: "$host_include_dirs" +if ! test -n "$DYNAMIC_LINKER"; then + linkflags="\"--dynamic-linker=$DYNAMIC_LINKER\", $linkflags" +fi + echo "/** GENERATED WITH $0 $* **/ #define HOST_TRIPLE \"$host\" #define HOST_ARCH IS$host_arch @@ -190,11 +197,12 @@ echo "/** GENERATED WITH $0 $* **/ #define HOST_CC \"$CC\" static const char *const host_predefs[] = {$host_predefs 0 }; -static const char *const host_linkcmd[] = {\"--dynamic-linker=$DYNAMIC_LINKER\", $linkflags}; -static const char *const host_ldstartfiles[] = {$ldstartfiles}; -static const char *const host_ldendfiles[] = {$ldendfiles}; -static const char *const host_ldstartfiles_pie[] = {$ldstartfiles_pie}; -static const char *const host_ldendfiles_pie[] = {$ldendfiles_pie}; +#define HOST_LINK_WITH_CC $link_with_cc +static const char *const host_linkcmd[] = {${linkflags:=0}}; +static const char *const host_ldstartfiles[] = {${ldstartfiles:=0}}; +static const char *const host_ldendfiles[] = {${ldendfiles:=0}}; +static const char *const host_ldstartfiles_pie[] = {${ldstartfiles_pie:=0}}; +static const char *const host_ldendfiles_pie[] = {${ldendfiles_pie:=0}}; " > src/hostconfig.h echo "# GENERATED WITH $0 $* |