mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-29 15:44:07 +00:00
patch for __alloca missing on ubuntu 18.04 (#352)
This commit is contained in:
parent
bec3335cf6
commit
292a8bec81
52
Makefile
52
Makefile
@ -22,6 +22,8 @@ CPUS := $(shell nproc)
|
||||
# Create the log directory if it doesn't already exist
|
||||
BUILD_LOG := $(shell mkdir -p "$(log_dir)" )
|
||||
|
||||
WGET ?= wget
|
||||
|
||||
# Check that we have a correct version of make
|
||||
# that matches at least the major version
|
||||
LOCAL_MAKE_VERSION := $(shell $(MAKE) --version | head -1 | cut -d' ' -f3)
|
||||
@ -230,10 +232,10 @@ define define_module =
|
||||
# wget creates it early, so we have to cleanup if it fails
|
||||
$(packages)/$($1_tar):
|
||||
$(call do,WGET,$($1_url),\
|
||||
if ! wget -O "$$@" $($1_url) ; then \
|
||||
rm -f "$$@" ; \
|
||||
if ! $(WGET) -O "$$@.tmp" $($1_url) ; then \
|
||||
exit 1 ; \
|
||||
fi \
|
||||
fi ; \
|
||||
mv "$$@.tmp" "$@" \
|
||||
)
|
||||
$(packages)/.$1-$($1_version)_verify: $(packages)/$($1_tar)
|
||||
echo "$($1_hash) $$^" | sha256sum --check -
|
||||
@ -555,30 +557,40 @@ $(eval $(shell echo >&2 "$(DATE) Wrong make detected: $(LOCAL_MAKE_VERSION)"))
|
||||
HEADS_MAKE := $(build)/$(make_dir)/make
|
||||
|
||||
# Once we have a proper Make, we can just pass arguments into it
|
||||
all bootstrap linux cpio: $(HEADS_MAKE)
|
||||
all linux cpio run: $(HEADS_MAKE)
|
||||
LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $(MAKE_JOBS) $@
|
||||
%.clean %.vol: $(HEADS_MAKE)
|
||||
%.clean %.vol %.menuconfig: $(HEADS_MAKE)
|
||||
LANG=C MAKE=$(HEADS_MAKE) $(HEADS_MAKE) $@
|
||||
|
||||
bootstrap: $(HEADS_MAKE)
|
||||
|
||||
# How to download and build the correct version of make
|
||||
$(HEADS_MAKE): $(build)/$(make_dir)/Makefile
|
||||
$(packages)/$(make_tar):
|
||||
$(WGET) -O "$@.tmp" "$(make_url)"
|
||||
if ! echo "$(make_hash) $@.tmp" | sha256sum --check -; then \
|
||||
exit 1 ; \
|
||||
fi
|
||||
mv "$@.tmp" "$@"
|
||||
|
||||
$(build)/$(make_dir)/.extract: $(packages)/$(make_tar)
|
||||
tar xf "$<" -C "$(build)"
|
||||
touch "$@"
|
||||
|
||||
$(build)/$(make_dir)/.patch: patches/make-$(make_version).patch $(build)/$(make_dir)/.extract
|
||||
( cd "$(dir $@)" ; patch -p1 ) < "$<"
|
||||
touch "$@"
|
||||
|
||||
$(build)/$(make_dir)/.configured: $(build)/$(make_dir)/.patch
|
||||
cd "$(dir $@)" ; \
|
||||
./configure 2>&1 \
|
||||
| tee "$(log_dir)/make.configure.log" \
|
||||
$(VERBOSE_REDIRECT)
|
||||
touch "$@"
|
||||
|
||||
$(HEADS_MAKE): $(build)/$(make_dir)/.configured
|
||||
make -C "$(dir $@)" $(MAKE_JOBS) \
|
||||
2>&1 \
|
||||
| tee "$(log_dir)/make.log" \
|
||||
$(VERBOSE_REDIRECT)
|
||||
|
||||
$(build)/$(make_dir)/Makefile: $(packages)/$(make_tar)
|
||||
tar xf "$<" -C build/
|
||||
cd "$(dir $@)" ; ./configure \
|
||||
2>&1 \
|
||||
| tee "$(log_dir)/make.configure.log" \
|
||||
$(VERBOSE_REDIRECT)
|
||||
|
||||
$(packages)/$(make_tar):
|
||||
wget -O "$@" "$(make_url)"
|
||||
if ! echo "$(make_hash) $@" | sha256sum --check -; then \
|
||||
$(MV) "$@" "$@.failed"; \
|
||||
false; \
|
||||
fi
|
||||
|
||||
endif
|
||||
|
@ -3,11 +3,11 @@
|
||||
# target platform.
|
||||
#modules += make
|
||||
|
||||
make_version := 4.2
|
||||
make_version := 4.2.1
|
||||
make_dir := make-$(make_version)
|
||||
make_tar := make-$(make_version).tar.bz2
|
||||
make_url := http://gnu.mirror.constant.com/make/$(make_tar)
|
||||
make_hash := 4e5ce3b62fe5d75ff8db92b7f6df91e476d10c3aceebf1639796dc5bfece655f
|
||||
make_hash := d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589
|
||||
|
||||
# This is built for the local machine, not the target, so it doesn't have any
|
||||
# of the build instructions.
|
||||
|
11
patches/make-4.2.1.patch
Normal file
11
patches/make-4.2.1.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- clean/make-4.2/glob/glob.c 2013-10-20 17:14:38.000000000 +0000
|
||||
+++ make-4.2/glob/glob.c 2018-09-18 10:16:03.860886356 +0000
|
||||
@@ -208,7 +208,7 @@
|
||||
#endif /* __GNU_LIBRARY__ || __DJGPP__ */
|
||||
|
||||
|
||||
-#if !defined __alloca && !defined __GNU_LIBRARY__
|
||||
+#if !defined __alloca && defined __GNU_LIBRARY__
|
||||
|
||||
# ifdef __GNUC__
|
||||
# undef alloca
|
Loading…
x
Reference in New Issue
Block a user