diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-12-27 18:11:03 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-12-27 18:33:55 +0100 |
commit | e88b2dabb69234dbfab57592faf9737a7cd226da (patch) | |
tree | 84e83df4427bfed063ea1715753fd4de3e03b873 | |
parent | 9135ff3195668f9eb8b7b12f60d047e295e50b8a (diff) |
optimize git downloader
We now can use a GIT Hash to set a specific checkout.
If this is used, you need to define PKG_HASH.
Convert libx264 and wiringPi to the new git downloader.
Fix toolchains components to use the new git downloader.
-rw-r--r-- | mk/fetch.mk | 16 | ||||
-rw-r--r-- | package/libx264/Makefile | 7 | ||||
-rw-r--r-- | package/wiringPi/Makefile | 1 | ||||
-rw-r--r-- | target/config/Config.in.libc.choice | 40 | ||||
-rw-r--r-- | target/config/Config.in.toolchain | 93 | ||||
-rw-r--r-- | toolchain/binutils/Makefile.inc | 2 | ||||
-rw-r--r-- | toolchain/gcc/Makefile.inc | 7 | ||||
-rw-r--r-- | toolchain/musl/Makefile.inc | 8 | ||||
-rw-r--r-- | toolchain/uclibc/Makefile.inc | 7 |
9 files changed, 73 insertions, 108 deletions
diff --git a/mk/fetch.mk b/mk/fetch.mk index 5b6cec08c..b6637ba0e 100644 --- a/mk/fetch.mk +++ b/mk/fetch.mk @@ -28,7 +28,8 @@ ifeq ($(strip ${NO_CHECKSUM}),) ${_CHECKSUM_COOKIE}: ${FULLDISTFILES} -rm -rf ${WRKDIR} ifneq ($(ADK_DISABLE_CHECKSUM),y) - @OK=n; \ + @if [ ! -e ${FULLDISTFILES}.nohash ]; then \ + OK=n; \ allsums="$(strip ${PKG_HASH})"; \ (shasum -a 256 ${FULLDISTFILES}; echo exit) | while read sum name; do \ if [[ $$sum = exit ]]; then \ @@ -46,7 +47,8 @@ ifneq ($(ADK_DISABLE_CHECKSUM),y) echo >&2 ":---> should be '$$cursum'"; \ echo >&2 ":---> really is '$$sum'"; \ OK=0; \ - done + done; \ + fi endif mkdir -p ${WRKDIR} touch ${_CHECKSUM_COOKIE} @@ -55,7 +57,7 @@ endif # GNU make's poor excuse for loops define FETCH_template $(1): - fullname='$(1)'; \ + @fullname='$(1)'; \ filename=$$$${fullname##*/}; \ mkdir -p "$$$${fullname%%/$$$$filename}"; \ cd "$$$${fullname%%/$$$$filename}"; \ @@ -73,6 +75,14 @@ $(1): git://*) \ rm -rf $${PKG_NAME}-$${PKG_VERSION}; \ git clone $${PKG_SITES} $${PKG_NAME}-$${PKG_VERSION}; \ + if [ $$$$(echo $${PKG_VERSION}|wc -c) -eq 41 ]; then \ + (cd $${PKG_NAME}-$${PKG_VERSION}; \ + echo "Checking out $${PKG_VERSION}"; \ + git checkout -q $${PKG_VERSION}); \ + else \ + echo "Using head, disabling checksum check"; \ + touch $$$${filename}.nohash; \ + fi; \ rm -rf $${PKG_NAME}-$${PKG_VERSION}/.git; \ tar cJf $${PKG_NAME}-$${PKG_VERSION}.tar.xz $${PKG_NAME}-$${PKG_VERSION}; \ rm -rf $${PKG_NAME}-$${PKG_VERSION}; \ diff --git a/package/libx264/Makefile b/package/libx264/Makefile index 809bed2e5..f8a9a48ee 100644 --- a/package/libx264/Makefile +++ b/package/libx264/Makefile @@ -4,14 +4,13 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= libx264 -# actually is git checkout from 22.09.2014 -PKG_VERSION:= 1.0.3 +PKG_VERSION:= 40bb56814e56ed342040bdbf30258aab39ee9e89 PKG_RELEASE:= 1 -PKG_HASH:= a87c87fd45915557c42e8534831310c3149a0addf4e7b0b337721e57ac4fe7df +PKG_HASH:= 88f63bd104b9127ebbaa6a88931c9f02d84f0dd4b5b3994ff38852735f60ead3 PKG_DESCR:= h264 encoding library PKG_SECTION:= libs/video PKG_URL:= http://www.videolan.org/developers/x264.html -PKG_SITES:= http://openadk.org/distfiles/ +PKG_SITES:= git://git.videolan.org/x264.git PKG_OPTS:= dev PKG_BUILDDEP_IBM_X40:= yasm-host diff --git a/package/wiringPi/Makefile b/package/wiringPi/Makefile index addbc49d9..5e75cc946 100644 --- a/package/wiringPi/Makefile +++ b/package/wiringPi/Makefile @@ -8,6 +8,7 @@ PKG_VERSION:= 0a9fdeb29d31609ef834f050bdb8a7a65cd35e2b PKG_RELEASE:= 1 PKG_DESCR:= gpio access library for the raspberry pi PKG_SECTION:= libs/misc +PKG_HASH:= ddc71b86f71e7e5104a89f88a68bea20122b6ea9f8c535219d180bf89502a69d PKG_URL:= http://wiringpi.com/ PKG_SITES:= git://git.drogon.net/wiringPi diff --git a/target/config/Config.in.libc.choice b/target/config/Config.in.libc.choice index 6e63c0c37..caec8799b 100644 --- a/target/config/Config.in.libc.choice +++ b/target/config/Config.in.libc.choice @@ -5,8 +5,7 @@ choice prompt "C library" config ADK_TARGET_LIB_UCLIBC_NG - prompt "uClibc-ng embedded C library" - boolean + bool "uClibc-ng embedded C library" select ADK_uclibc_ng depends on \ !ADK_TARGET_ARCH_AARCH64 && \ @@ -20,8 +19,7 @@ config ADK_TARGET_LIB_UCLIBC_NG http://uclibc-ng.org config ADK_TARGET_LIB_MUSL - prompt "musl C library" - boolean + bool "musl C library" select ADK_musl depends on !ADK_TARGET_UCLINUX depends on \ @@ -36,8 +34,7 @@ config ADK_TARGET_LIB_MUSL http://musl-libc.org config ADK_TARGET_LIB_GLIBC - prompt "GNU C library" - boolean + bool "GNU C library" select ADK_glibc depends on !ADK_TARGET_ARCH_ARC depends on !ADK_TARGET_ARCH_AVR32 @@ -49,8 +46,7 @@ config ADK_TARGET_LIB_GLIBC http://www.gnu.org/libc config ADK_TARGET_LIB_UCLIBC - prompt "uClibc embedded C library" - boolean + bool "uClibc embedded C library" select ADK_uclibc depends on \ !ADK_TARGET_ARCH_AARCH64 && \ @@ -70,47 +66,35 @@ choice prompt "C library version" config ADK_TARGET_LIB_UCLIBC_NG_GIT - prompt "git" - boolean - select ADK_DISABLE_CHECKSUM + bool "git" depends on ADK_TARGET_LIB_UCLIBC_NG config ADK_TARGET_LIB_GLIBC_2_20 - prompt "2.20" - boolean + bool "2.20" depends on ADK_TARGET_LIB_GLIBC config ADK_TARGET_LIB_GLIBC_2_19 - prompt "2.19" - boolean + bool "2.19" depends on ADK_TARGET_LIB_GLIBC config ADK_TARGET_LIB_GLIBC_GIT - prompt "git" - boolean - select ADK_DISABLE_CHECKSUM + bool "git" depends on ADK_TARGET_LIB_GLIBC config ADK_TARGET_LIB_UCLIBC_GIT - prompt "git" - boolean - select ADK_DISABLE_CHECKSUM + bool "git" depends on ADK_TARGET_LIB_UCLIBC config ADK_TARGET_LIB_UCLIBC_0_9_33_2 - prompt "0.9.33.2" - boolean + bool "0.9.33.2" depends on ADK_TARGET_LIB_UCLIBC config ADK_TARGET_LIB_MUSL_1_1_5 - prompt "1.1.5" - boolean + bool "1.1.5" depends on ADK_TARGET_LIB_MUSL config ADK_TARGET_LIB_MUSL_GIT - prompt "git" - boolean - select ADK_DISABLE_CHECKSUM + bool "git" depends on ADK_TARGET_LIB_MUSL endchoice diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain index 0c19ef73e..5d26f8980 100644 --- a/target/config/Config.in.toolchain +++ b/target/config/Config.in.toolchain @@ -14,28 +14,23 @@ choice prompt "GCC version" config ADK_TOOLCHAIN_GCC_4_4_7 - prompt "4.4.7" - boolean + bool "4.4.7" depends on ADK_TARGET_ARCH_AVR32 config ADK_TOOLCHAIN_GCC_4_5_4 - prompt "4.5.4" - boolean + bool "4.5.4" depends on ADK_TARGET_ARCH_BFIN config ADK_TOOLCHAIN_GCC_4_7_4 - prompt "4.7.4" - boolean + bool "4.7.4" depends on ADK_TARGET_ARCH_CRIS || ADK_TARGET_ARCH_C6X config ADK_TOOLCHAIN_GCC_4_8_0_ARC - prompt "4.8.0-arc" - boolean + bool "4.8.0-arc" depends on ADK_TARGET_ARCH_ARC config ADK_TOOLCHAIN_GCC_4_8_4 - prompt "4.8.4" - boolean + bool "4.8.4" depends on !ADK_TARGET_ARCH_BFIN depends on !ADK_TARGET_ARCH_AARCH64 depends on !ADK_TARGET_ARCH_ARC @@ -45,8 +40,7 @@ config ADK_TOOLCHAIN_GCC_4_8_4 depends on !ADK_TARGET_ARCH_C6X config ADK_TOOLCHAIN_GCC_4_9_2 - prompt "4.9.2" - boolean + bool "4.9.2" depends on !ADK_TARGET_ARCH_BFIN depends on !ADK_TARGET_ARCH_ARC depends on !ADK_TARGET_ARCH_AVR32 @@ -54,9 +48,7 @@ config ADK_TOOLCHAIN_GCC_4_9_2 depends on !ADK_TARGET_ARCH_C6X config ADK_TOOLCHAIN_GCC_GIT - prompt "git" - boolean - select ADK_DISABLE_CHECKSUM + bool "git" depends on !ADK_TARGET_ARCH_BFIN depends on !ADK_TARGET_ARCH_ARC depends on !ADK_TARGET_ARCH_AVR32 @@ -68,25 +60,21 @@ choice prompt "Binutils version" config ADK_TOOLCHAIN_BINUTILS_2_20_1 - prompt "2.20.1" - boolean + bool "2.20.1" depends on ADK_TARGET_ARCH_AVR32 config ADK_TOOLCHAIN_BINUTILS_2_22 - prompt "2.22" - boolean + bool "2.22" depends on ADK_TARGET_ARCH_BFIN \ || ADK_TARGET_ARCH_CRIS \ || ADK_TARGET_ARCH_M68K config ADK_TOOLCHAIN_BINUTILS_2_23_ARC - prompt "2.23-arc" - boolean + bool "2.23-arc" depends on ADK_TARGET_ARCH_ARC config ADK_TOOLCHAIN_BINUTILS_2_24 - prompt "2.24" - boolean + bool "2.24" depends on !ADK_TARGET_ARCH_BFIN depends on !ADK_TARGET_ARCH_ARC depends on !ADK_TARGET_ARCH_AVR32 @@ -94,9 +82,7 @@ config ADK_TOOLCHAIN_BINUTILS_2_24 depends on !ADK_TARGET_ARCH_M68K config ADK_TOOLCHAIN_BINUTILS_GIT - prompt "git" - boolean - select ADK_DISABLE_CHECKSUM + bool "git" depends on !ADK_TARGET_ARCH_BFIN depends on !ADK_TARGET_ARCH_ARC depends on !ADK_TARGET_ARCH_AVR32 @@ -114,7 +100,7 @@ config ADK_TARGET_CFLAGS_OPT choice prompt "Optimization level" -boolean +bool config ADK_TARGET_CFLAGS_OPT_OS prompt "optimize for size (-Os)" @@ -131,79 +117,57 @@ config ADK_TARGET_CFLAGS_OPT_O0 endchoice config ADK_TARGET_ARCH_ARM_WITH_THUMB - prompt "Use THUMB2 only mode" - boolean + bool "Use THUMB2 only mode" select ADK_KERNEL_THUMB2_KERNEL - default n depends on ADK_TARGET_ARCH_ARM help Experimental option. Use with care. config ADK_TOOLCHAIN_WITH_SSP - boolean - default n + bool config ADK_TARGET_USE_SSP - prompt "Use Stack Smashing Protection for all packages" - boolean + bool "Use Stack Smashing Protection for all packages" select ADK_TOOLCHAIN_WITH_SSP - default n config ADK_TARGET_USE_PIE - prompt "Use Position Independent Executable for packages with have support for it" - boolean - default n + bool "Use Position Independent Executable for packages with have support for it" config ADK_TOOLCHAIN_WITH_LTO - boolean - default n + bool config ADK_TARGET_USE_LTO - prompt "Use Link Time Optimization for all packages" - boolean + bool "Use Link Time Optimization for all packages" select ADK_TOOLCHAIN_WITH_LTO - default n config ADK_TARGET_USE_LD_RELRO - prompt "Use LD read-only (-z relro) relocations for all packages" - boolean - default n + bool "Use LD read-only (-z relro) relocations for all packages" config ADK_TARGET_USE_LD_BIND_NOW - prompt "Use LD bind now (-z now) for all packages" - boolean - default n + bool "Use LD bind now (-z now) for all packages" config ADK_TARGET_USE_LD_GC - prompt "Use LD garbage collection for all packages" - boolean - default n + bool "Use LD garbage collection for all packages" config ADK_TOOLCHAIN_WITH_GOLD - boolean - default n + bool config ADK_TARGET_USE_GOLD - prompt "Use GOLD as linker for all packages" - boolean + bool "Use GOLD as linker for all packages" select ADK_TOOLCHAIN_WITH_GOLD depends on !ADK_TARGET_ARCH_MIPS depends on !ADK_TARGET_ARCH_MIPS64 - default n config ADK_TARGET_USE_GNU_HASHSTYLE - prompt "Use GNU hashstyle for all packages" - boolean + bool "Use GNU hashstyle for all packages" depends on !ADK_TARGET_ARCH_MIPS depends on !ADK_TARGET_ARCH_MIPS64 - default n help Performance optimization for applications with lot of shared library dependencies. See http://www.akkadia.org/drepper/dsohowto.pdf config ADK_DEBUG bool "Compile applications with debug support and do not strip" - default n help All software for the target will be compiled with: -fno-omit-frame-pointer @@ -215,7 +179,6 @@ config ADK_DEBUG config ADK_DEBUG_STRIP bool "strip target binaries/libraries for gdbserver usage" depends on ADK_DEBUG - default n help All packages and C library will be compiled with debug information, but stripped for the target. @@ -229,14 +192,12 @@ config ADK_TARGET_USE_STATIC_LIBS at runtime. Full static builds are only supported for musl libc. config ADK_STATIC_TOOLCHAIN - boolean "Build the toolchain components statically" - default n + bool "Build the toolchain components statically" help If you want to create more portable toolchains, build them static. config ADK_UCLIBC_TEST - prompt "Build testsuite for C library" - boolean + bool "Build testsuite for C library" depends on ADK_TARGET_LIB_UCLIBC_NG || ADK_TARGET_LIB_UCLIBC default y diff --git a/toolchain/binutils/Makefile.inc b/toolchain/binutils/Makefile.inc index 746b6e958..f81e5a80c 100644 --- a/toolchain/binutils/Makefile.inc +++ b/toolchain/binutils/Makefile.inc @@ -35,6 +35,6 @@ endif ifeq ($(ADK_TOOLCHAIN_BINUTILS_GIT),y) PKG_VERSION:= git PKG_RELEASE:= 1 -PKG_REPO:= git://sourceware.org/git/binutils-gdb.git +PKG_SITES:= git://sourceware.org/git/binutils-gdb.git DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz endif diff --git a/toolchain/gcc/Makefile.inc b/toolchain/gcc/Makefile.inc index da314a8c8..65bbeba52 100644 --- a/toolchain/gcc/Makefile.inc +++ b/toolchain/gcc/Makefile.inc @@ -51,3 +51,10 @@ PKG_RELEASE:= 1 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz LIBSTDCXXVER:= 19 endif +ifeq ($(ADK_TOOLCHAIN_GCC_GIT),y) +PKG_VERSION:= git +PKG_SITES:= git://gcc.gnu.org/git/gcc.git +PKG_RELEASE:= 1 +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz +LIBSTDCXXVER:= 19 +endif diff --git a/toolchain/musl/Makefile.inc b/toolchain/musl/Makefile.inc index 4fd2e0902..e8e6ea767 100644 --- a/toolchain/musl/Makefile.inc +++ b/toolchain/musl/Makefile.inc @@ -4,11 +4,13 @@ PKG_NAME:= musl ifeq ($(ADK_LIBC_VERSION),git) PKG_VERSION:= git -PKG_REPO:= git://git.musl-libc.org/musl +PKG_RELEASE:= 1 +PKG_SITES:= git://git.musl-libc.org/musl +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz else PKG_VERSION:= $(ADK_LIBC_VERSION) -PKG_SITES:= http://www.musl-libc.org/releases/ -endif PKG_RELEASE:= 1 PKG_HASH:= 352362b1724cc9740f4c3ce0fe02aae45e4de9809ea4ac961f31aedc11b87393 +PKG_SITES:= http://www.musl-libc.org/releases/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz +endif diff --git a/toolchain/uclibc/Makefile.inc b/toolchain/uclibc/Makefile.inc index 70d1132ba..05647793e 100644 --- a/toolchain/uclibc/Makefile.inc +++ b/toolchain/uclibc/Makefile.inc @@ -5,11 +5,12 @@ PKG_NAME:= uClibc ifeq ($(ADK_LIBC_VERSION),git) PKG_VERSION:= 0.9.34-git PKG_RELEASE:= 1 -PKG_REPO:= git://git.uclibc.org/uClibc.git +PKG_SITES:= git://git.uclibc.org/uClibc.git +DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.xz else PKG_VERSION:= $(ADK_LIBC_VERSION) PKG_RELEASE:= 1 -PKG_SITES:= http://uclibc.org/downloads/ -endif PKG_HASH:= 62333167b79afb0b25a843513288c67b59547acf653e8fbe62ee64e71ebd1587 +PKG_SITES:= http://uclibc.org/downloads/ DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.xz +endif |