diff --git a/modules/cryptsetup b/modules/cryptsetup index 8d487a1ea..dd4015e31 100644 --- a/modules/cryptsetup +++ b/modules/cryptsetup @@ -12,11 +12,14 @@ cryptsetup_configure := ./configure \ CC="$(heads_cc)" \ CFLAGS="-I$(INSTALL)/include" \ LDFLAGS="-L$(INSTALL)/lib" \ + --host i386-elf-linux \ --prefix "$(INSTALL)" \ --disable-gcrypt-pbkdf2 \ --with-crypto_backend=kernel \ -cryptsetup_target := -j 8 install +cryptsetup_target := \ + -j 8 \ + install cryptsetup_output := \ src/.libs/cryptsetup \ diff --git a/modules/gpg b/modules/gpg index 04a1d1add..6ca97e61e 100644 --- a/modules/gpg +++ b/modules/gpg @@ -10,12 +10,12 @@ gpg_hash := 6b47a3100c857dcab3c60e6152e56a997f2c7862c1b8b2b25adf3884a1ae2276 gpg_configure := ./configure \ CC="$(heads_cc)" \ - CFLAGS="-I$(INSTALL)/include" \ - LDFLAGS="-L$(INSTALL)/lib" \ + --host i386-elf-linux \ --prefix $(INSTALL) \ --disable-bzip2 \ --disable-gpg \ --disable-gpgsm \ + --disable-asm \ --disable-agent \ --disable-scdaemon \ --disable-tools \ diff --git a/modules/kexec b/modules/kexec index 59de2b9da..759be1e4f 100644 --- a/modules/kexec +++ b/modules/kexec @@ -10,6 +10,7 @@ kexec_configure := ./configure \ CC="$(heads_cc)" \ CFLAGS="-I$(INSTALL)/include" \ LDFLAGS="-L$(INSTALL)/lib" \ + --host i386-elf-linux \ --prefix="$(INSTALL)" \ --without-zlib \ --without-lzma \ diff --git a/modules/libuuid b/modules/libuuid index c31677402..5ab2c3a88 100644 --- a/modules/libuuid +++ b/modules/libuuid @@ -9,6 +9,7 @@ libuuid_hash := 46af3275291091009ad7f1b899de3d0cea0252737550e7919d17237997db5644 libuuid_configure := ./configure \ CC="$(heads_cc)" \ --prefix $(INSTALL) \ + --host i386-elf-linux \ libuuid_target := install diff --git a/modules/lvm2 b/modules/lvm2 index dee0903b4..2b1730c6d 100644 --- a/modules/lvm2 +++ b/modules/lvm2 @@ -6,14 +6,23 @@ lvm2_tar := LVM2.$(lvm2_version).tgz lvm2_url := http://mirrors.kernel.org/sourceware/lvm2/$(lvm2_tar) lvm2_hash := 23a3d1cddd41b3ef51812ebf83e9fa491f502fe74130d4263be327a91914660d -lvm2_configure := ./configure \ +# cross compiling test assumes malloc/realloc aren't glibc compat +# so we force it via the configure cache. +lvm2_configure := \ CC="$(heads_cc)" \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + ./configure \ + --host i386-elf-linux \ --prefix $(INSTALL) \ --disable-selinux \ --disable-udev-systemd-background-jobs \ --disable-realtime \ + --with-cluster=none \ -lvm2_target := -j 8 install_device-mapper +# not sure why LIB_SUFFIX is not defined in the cross build +lvm2_target := \ + install_device-mapper \ #lvm2_libraries := libdm/libdevmapper.so diff --git a/modules/musl b/modules/musl index b97fa0c27..a437581b4 100644 --- a/modules/musl +++ b/modules/musl @@ -9,12 +9,11 @@ musl_hash := 97e447c7ee2a7f613186ec54a93054fe15469fe34d7d323080f7ef38f5ecb0fa musl_output := $(INSTALL)/bin/musl-gcc # -# Note that for syslibdir to be /lib the install will likely fail. -# this is unfortunate, but can be worked around by making sure that -# a /lib/ld-musl-x86_64.so.1 symlink exists and points to libc.so -# for your musl build. +# Note that for syslibdir to be /lib the install will fail. +# this is unfortunate since it prevents the binaries from running +# and requires that we treat the rest of the build as a cross compile. # -# Otherwise we'll have to make a whole cross compiler setup. +# That works, with some hacks... # musl_configure := ./configure \ --prefix="$(INSTALL)" \ diff --git a/modules/popt b/modules/popt index 92cb35b1f..a8468eb39 100644 --- a/modules/popt +++ b/modules/popt @@ -9,6 +9,7 @@ popt_hash := e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8 popt_configure := ./configure \ CC="$(heads_cc)" \ --prefix $(INSTALL) \ + --host i386-elf-linux \ popt_target := install diff --git a/modules/qrencode b/modules/qrencode index 8bd9e1084..8f0ab135c 100644 --- a/modules/qrencode +++ b/modules/qrencode @@ -12,6 +12,7 @@ qrencode_configure := ./configure \ CC="$(heads_cc)" \ --prefix $(INSTALL) \ --without-tools \ + --host i386-elf-linux \ qrencode_target := install diff --git a/modules/tpmtotp b/modules/tpmtotp index 39158289d..118bfee73 100644 --- a/modules/tpmtotp +++ b/modules/tpmtotp @@ -11,7 +11,10 @@ tpmtotp_dir := tpmtotp-$(tpmtotp_version) #tpmtotp_url := https://github.com/osresearch/tpmtotp/archive/v0.0.1.tar.gz #tpmtotp_hash := 8bf2380248fea540a96ad0ff8a4f170b8d93b6bb5fe49b958f9f1926f994823f -tpmtotp_target := CC="$(heads_cc)" +tpmtotp_target := \ + CC="$(heads_cc)" \ + CFLAGS="-I$(INSTALL)/include" \ + LDFLAGS="-L$(INSTALL)/lib" \ tpmtotp_output := \ totp \