Verified Commit 2804ab05 authored by Jonathon Hall's avatar Jonathon Hall
Browse files

librem_l1um: Build with make 4.2.1



The 4.11 branch of coreboot used for librem_l1um does not build with
make 4.3+.  Heads used make 4.2.1 until recently, bring back make 4.2.1
for librem_l1um only.

Signed-off-by: Jonathon Hall's avatarJonathon Hall <jonathon.hall@puri.sm>
parent c23d0ee2
......@@ -17,5 +17,12 @@ GIT_VERSION=$(git describe --tags --dirty)
for board in ${build_targets[@]}
do
make BOARD=$board
# L1UM uses coreboot 4.11, which does not build with make 4.3+. Build
# and use make 4.2.1 for this board.
if [ "$board" = "librem_l1um" ]; then
make -f make421.makefile
PATH="$(pwd)/build/make-4.2.1:$PATH" make BOARD="$board"
else
make BOARD="$board"
fi
done
......@@ -69,7 +69,7 @@ do
rm ${filepath}${filename} 2>/dev/null | true
# build board
while ! make BOARD=${board}
while ! ./build.sh "${board}"
do
read -rp "Build failed - retry?" retry
if [[ "$retry" != "Y" && "$retry" != "y" ]] ; then
......
# This makefile is used to download, patch, configure, and build make 4.2.1,
# which is required for coreboot 4.11 used for Librem L1UM.
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 := d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589
pwd := $(shell pwd)
build := $(pwd)/build
packages := $(pwd)/packages
.DEFAULT_GOAL := default
$(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: $(build)/$(make_dir)/.extract
( cd "$(dir $@)" ; patch -p1 ) < "patches/make-$(make_version).patch"
touch "$@"
$(build)/$(make_dir)/.configured: $(build)/$(make_dir)/.patch
cd "$(dir $@)"; ./configure
touch "$@"
$(build)/$(make_dir)/make: $(build)/$(make_dir)/.configured
make -C "$(dir $@)" $(MAKE_JOBS)
default: $(build)/$(make_dir)/make
--- clean/make-4.2.1/glob/glob.c 2013-10-20 19:14:38.000000000 +0200
+++ make-4.2.1/glob/glob.c 2021-09-18 17:51:09.814552369 +0200
@@ -208,7 +208,7 @@
#endif /* __GNU_LIBRARY__ || __DJGPP__ */
-#if !defined __alloca && !defined __GNU_LIBRARY__
+#if !defined __alloca && defined __GNU_LIBRARY__
# ifdef __GNUC__
# undef alloca
@@ -231,7 +231,7 @@
#endif
-#ifndef __GNU_LIBRARY__
+#ifdef __GNU_LIBRARY__
# define __stat stat
# ifdef STAT_MACROS_BROKEN
# undef S_ISDIR
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment