Skip to content

Instantly share code, notes, and snippets.

@MilhouseVH
Last active February 27, 2018 17:10
Show Gist options
  • Save MilhouseVH/d8956e42aa0eafb0e2e59b9ad89ed65a to your computer and use it in GitHub Desktop.
Save MilhouseVH/d8956e42aa0eafb0e2e59b9ad89ed65a to your computer and use it in GitHub Desktop.
diff --git a/config/functions b/config/functions
index 18b02f7..7c5ace5 100644
--- a/config/functions
+++ b/config/functions
@@ -34,7 +34,9 @@ setup_toolchain() {
# parallel
if ! flag_enabled "parallel" "yes"; then
export NINJA_OPTS="$NINJA_OPTS -j1"
- export MAKE_OPTS="$MAKE_OPTS -j1"
+ export MAKEFLAGS="-j1"
+ else
+ export MAKEFLAGS="-j$CONCURRENCY_MAKE_LEVEL"
fi
case "$1" in
diff --git a/config/optimize b/config/optimize
index cc76461..8327922 100644
--- a/config/optimize
+++ b/config/optimize
@@ -12,7 +12,6 @@ else
fi
NINJA_OPTS=""
-MAKE_OPTS=""
TARGET_CPPFLAGS=""
TARGET_CFLAGS="$TARGET_CFLAGS -Wall -pipe $GCC_OPTIM $PROJECT_CFLAGS"
diff --git a/config/path b/config/path
index c2a579f..3334d52 100644
--- a/config/path
+++ b/config/path
@@ -134,7 +134,6 @@ XORG_PATH_DRIVERS=/usr/lib/xorg/modules/drivers
if [ -z "$CCACHE_DIR" ]; then
export CCACHE_DIR=$BUILD/.ccache
fi
-export MAKEFLAGS=-j$CONCURRENCY_MAKE_LEVEL
if [[ -z "$PATH" || ( "$PATH" != "$TOOLCHAIN/bin:$TOOLCHAIN/sbin" && "$PATH" = "${PATH#$TOOLCHAIN/bin:$TOOLCHAIN/sbin:}" ) ]]; then
export PATH="$TOOLCHAIN/bin:$TOOLCHAIN/sbin${PATH:+":$PATH"}"
diff --git a/packages/compress/bzip2/package.mk b/packages/compress/bzip2/package.mk
index e462aaf..f0c4f37 100644
--- a/packages/compress/bzip2/package.mk
+++ b/packages/compress/bzip2/package.mk
@@ -28,7 +28,7 @@ PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="compress"
PKG_SHORTDESC="bzip2 data compressor"
PKG_LONGDESC="bzip2 is a freely available, patent free (see below), high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression."
-PKG_BUILD_FLAGS="+pic"
+PKG_BUILD_FLAGS="+pic +pic:host"
pre_build_host() {
mkdir -p $PKG_BUILD/.$HOST_NAME
diff --git a/packages/devel/gmp/package.mk b/packages/devel/gmp/package.mk
index f08263a..14fefa2 100644
--- a/packages/devel/gmp/package.mk
+++ b/packages/devel/gmp/package.mk
@@ -27,7 +27,7 @@ PKG_DEPENDS_HOST="ccache:host"
PKG_SECTION="devel"
PKG_SHORTDESC="gmp: The GNU MP (multiple precision arithmetic) library"
PKG_LONGDESC="GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, by carefully optimized assembly code for the most common inner loops for a lots of CPUs, and by a general emphasis on speed (instead of simplicity or elegance). The speed of GNU MP is believed to be faster than any other similar library. The advantage for GNU MP increases with the operand sizes for certain operations, since GNU MP in many cases has asymptotically faster algorithms."
-PKG_BUILD_FLAGS="+pic"
+PKG_BUILD_FLAGS="+pic:host"
PKG_CONFIGURE_OPTS_HOST="--enable-cxx --enable-static --disable-shared"
diff --git a/packages/network/samba/package.mk b/packages/network/samba/package.mk
index e96de4f..6d2a89b 100644
--- a/packages/network/samba/package.mk
+++ b/packages/network/samba/package.mk
@@ -28,7 +28,7 @@ PKG_NEED_UNPACK="$(get_pkg_directory heimdal) $(get_pkg_directory e2fsprogs)"
PKG_SECTION="network"
PKG_SHORTDESC="samba: The free SMB / CIFS fileserver and client"
PKG_LONGDESC="Samba is a SMB server that runs on Unix and other operating systems. It allows these operating systems (currently Unix, Netware, OS/2 and AmigaDOS) to act as a file and print server for SMB and CIFS clients. There are many Lan-Manager compatible clients such as LanManager for DOS, Windows for Workgroups, Windows NT, Windows 95, Linux smbfs, OS/2, Pathworks and more."
-#PKG_BUILD_FLAGS="-gold"
+PKG_BUILD_FLAGS="-gold"
PKG_MAKE_OPTS_TARGET="V=1"
@@ -106,7 +106,7 @@ pre_configure_target() {
# samba uses its own build directory
cd $PKG_BUILD
rm -rf .$TARGET_NAME
-echo $CFLAGS
+
# work around link issues
export LDFLAGS="$LDFLAGS -lreadline"
diff --git a/packages/tools/populatefs/package.mk b/packages/tools/populatefs/package.mk
index da33c23..5357876 100644
--- a/packages/tools/populatefs/package.mk
+++ b/packages/tools/populatefs/package.mk
@@ -27,7 +27,7 @@ PKG_DEPENDS_HOST="e2fsprogs:host"
PKG_SECTION="tools"
PKG_SHORTDESC="populatefs: Tool for replacing genext2fs when creating ext4 images"
PKG_LONGDESC="populatefs: Tool for replacing genext2fs when creating ext4 images"
-PKG_BUILD_FLAGS="+pic"
+PKG_BUILD_FLAGS="+pic:host"
make_host() {
make EXTRA_LIBS="-lcom_err -lpthread"
diff --git a/scripts/build b/scripts/build
index 63ad0b8..1da1ae2 100755
--- a/scripts/build
+++ b/scripts/build
@@ -454,19 +454,19 @@ else
# make based builds
"configure:target"|"cmake-make:target"|"autotools:target"|"make:target")
echo "Executing (target): make $PKG_MAKE_OPTS_TARGET" | tr -s " "
- make $MAKE_OPTS $PKG_MAKE_OPTS_TARGET
+ make $PKG_MAKE_OPTS_TARGET
;;
"configure:host"|"cmake-make:host"|"autotools:host"|"make:host")
echo "Executing (host): make $PKG_MAKE_OPTS_HOST" | tr -s " "
- make $MAKE_OPTS $PKG_MAKE_OPTS_HOST
+ make $PKG_MAKE_OPTS_HOST
;;
"configure:init"|"cmake-make:init"|"autotools:init"|"make:init")
echo "Executing (init): make $PKG_MAKE_OPTS_INIT" | tr -s " "
- make $MAKE_OPTS $PKG_MAKE_OPTS_INIT
+ make $PKG_MAKE_OPTS_INIT
;;
"configure:bootstrap"|"cmake-make:bootstrap"|"autotools:bootstrap"|"make:bootstrap")
echo "Executing (bootstrap): make $PKG_MAKE_OPTS_BOOTSTRAP" | tr -s " "
- make $MAKE_OPTS $PKG_MAKE_OPTS_BOOTSTRAP
+ make $PKG_MAKE_OPTS_BOOTSTRAP
;;
esac
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment