diff options
-rw-r--r-- | Makefile.in | 13 | ||||
-rwxr-xr-x | configure | 37 | ||||
-rw-r--r-- | configure.ac | 11 |
3 files changed, 44 insertions, 17 deletions
diff --git a/Makefile.in b/Makefile.in index 9b3d747..37c1c5e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -52,6 +52,8 @@ GLIBC_CXX_FOR_TARGET ?= riscv$(XLEN)-unknown-linux-gnu-g++ NEWLIB_CC_FOR_TARGET ?= riscv$(XLEN)-unknown-elf-gcc NEWLIB_CXX_FOR_TARGET ?= riscv$(XLEN)-unknown-elf-g++ +CONFIGURE_HOST = @configure_host@ + all: @default_target@ newlib: stamps/build-gcc-newlib-stage2 linux: stamps/build-gcc-linux-stage2 @@ -83,6 +85,7 @@ stamps/build-binutils-linux: $(srcdir)/riscv-binutils-gdb mkdir $(notdir $@) cd $(notdir $@) && $</configure \ --target=riscv$(XLEN)-unknown-linux-gnu \ + $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --with-sysroot=$(SYSROOT) \ $(MULTILIB_FLAGS) \ @@ -143,13 +146,13 @@ stamps/build-gcc-linux-stage1: $(srcdir)/riscv-gcc stamps/build-binutils-linux \ mkdir $(notdir $@) cd $(notdir $@) && $</configure \ --target=riscv$(XLEN)-unknown-linux-gnu \ + $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --with-sysroot=$(SYSROOT) \ --with-newlib \ --without-headers \ --disable-shared \ --disable-threads \ - --with-system-zlib \ --enable-tls \ --enable-languages=c \ --disable-libatomic \ @@ -175,9 +178,9 @@ stamps/build-gcc-linux-stage2: $(srcdir)/riscv-gcc $(addprefix stamps/build-glib mkdir $(notdir $@) cd $(notdir $@) && $</configure \ --target=riscv$(XLEN)-unknown-linux-gnu \ + $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --with-sysroot=$(SYSROOT) \ - --with-system-zlib \ --enable-shared \ --enable-tls \ --enable-languages=c,c++,fortran \ @@ -200,6 +203,7 @@ stamps/build-binutils-newlib: $(srcdir)/riscv-binutils-gdb mkdir $(notdir $@) cd $(notdir $@) && $</configure \ --target=riscv$(XLEN)-unknown-elf \ + $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --disable-werror $(MAKE) -C $(notdir $@) @@ -211,12 +215,12 @@ stamps/build-gcc-newlib-stage1: $(srcdir)/riscv-gcc stamps/build-binutils-newlib mkdir $(notdir $@) cd $(notdir $@) && $</configure \ --target=riscv$(XLEN)-unknown-elf \ + $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --disable-shared \ --disable-threads \ --disable-tls \ --enable-languages=c,c++ \ - --with-system-zlib \ --with-newlib \ --disable-libmudflap \ --disable-libssp \ @@ -237,6 +241,7 @@ stamps/build-newlib: $(srcdir)/riscv-newlib stamps/build-gcc-newlib-stage1 mkdir $(notdir $@) cd $(notdir $@) && $</configure \ --target=riscv$(XLEN)-unknown-elf \ + $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --enable-newlib-io-long-double \ --enable-newlib-io-long-long \ @@ -251,11 +256,11 @@ stamps/build-gcc-newlib-stage2: $(srcdir)/riscv-gcc stamps/build-newlib mkdir $(notdir $@) cd $(notdir $@) && $</configure \ --target=riscv$(XLEN)-unknown-elf \ + $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --disable-shared \ --disable-threads \ --enable-languages=c,c++ \ - --with-system-zlib \ --enable-tls \ --with-newlib \ --with-headers=$(INSTALL_DIR)/riscv$(XLEN)-unknown-elf/include \ @@ -584,6 +584,7 @@ PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS +configure_host cmodel gcc_checking multilib_names @@ -627,7 +628,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -657,6 +657,7 @@ with_abi enable_multilib enable_gcc_checking with_cmodel +with_host ' ac_precious_vars='build_alias host_alias @@ -704,7 +705,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -957,15 +957,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1103,7 +1094,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1256,7 +1247,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1303,6 +1293,9 @@ Optional Packages: --with-abi=lp64d Sets the base RISC-V ABI, defaults to lp64d --with-cmodel Select the code model to use when building libc and libgcc [--with-cmodel=medlow] + --with-host=x86_64-w64-mingw32 + Sets the host for the tools, you probably want + nothing Some influential environment variables: CC C compiler command @@ -3332,6 +3325,24 @@ ac_config_files="$ac_config_files scripts/wrapper/awk/awk" ac_config_files="$ac_config_files scripts/wrapper/sed/sed" + +# Check whether --with-host was given. +if test "${with_host+set}" = set; then : + withval=$with_host; +else + with_host=default + +fi + + +if test "x$with_host" != xdefault; then : + configure_host=--host=$with_host + +else + configure_host="" + +fi + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/configure.ac b/configure.ac index 90d949f..c0f3a9f 100644 --- a/configure.ac +++ b/configure.ac @@ -124,4 +124,15 @@ AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([scripts/wrapper/awk/awk], [chmod +x scripts/wrapper/awk]) AC_CONFIG_FILES([scripts/wrapper/sed/sed], [chmod +x scripts/wrapper/sed]) +AC_ARG_WITH(host, + [AS_HELP_STRING([--with-host=x86_64-w64-mingw32], + [Sets the host for the tools, you probably want nothing])], + [], + [with_host=default] + ) + +AS_IF([test "x$with_host" != xdefault], + [AC_SUBST(configure_host,--host=$with_host)], + [AC_SUBST(configure_host,"")]) + AC_OUTPUT |