mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 09:16:21 +00:00
Working build with musl-libc cross compiler (issue #77).
Pass in the --host argument to all of the various programs that need to treat the configure scripts as cross compilation targets. This removes all dependencies on the host libc (issue #7) and adds some tools to the initrd (cryptsetup #46).
This commit is contained in:
parent
e68f09bbfd
commit
58ff95818e
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -9,6 +9,7 @@ libuuid_hash := 46af3275291091009ad7f1b899de3d0cea0252737550e7919d17237997db5644
|
||||
libuuid_configure := ./configure \
|
||||
CC="$(heads_cc)" \
|
||||
--prefix $(INSTALL) \
|
||||
--host i386-elf-linux \
|
||||
|
||||
libuuid_target := install
|
||||
|
||||
|
13
modules/lvm2
13
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
|
||||
|
||||
|
@ -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)" \
|
||||
|
@ -9,6 +9,7 @@ popt_hash := e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8
|
||||
popt_configure := ./configure \
|
||||
CC="$(heads_cc)" \
|
||||
--prefix $(INSTALL) \
|
||||
--host i386-elf-linux \
|
||||
|
||||
popt_target := install
|
||||
|
||||
|
@ -12,6 +12,7 @@ qrencode_configure := ./configure \
|
||||
CC="$(heads_cc)" \
|
||||
--prefix $(INSTALL) \
|
||||
--without-tools \
|
||||
--host i386-elf-linux \
|
||||
|
||||
qrencode_target := install
|
||||
|
||||
|
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user