summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-01-10 09:59:12 (GMT)
committerWaldemar Brodkorb <wbx@openadk.org>2011-01-10 09:59:12 (GMT)
commita217fc80b29080dae963bb15051df023de36ce39 (patch)
treee69fc812c517d767ca1a24a60cc2b9c8ce1bb3c0
parent7709c0e4f3a9ea4fddbe5764c000135f9eacac49 (diff)
add LTO support to toolchain settings. Cleanup SYSROOT mess.
- just use on sysroot directory for toolchain. - add missing patches from previos commit. (rpath/cflags cleanup)
-rw-r--r--TODO13
-rw-r--r--mk/build.mk1
-rw-r--r--mk/buildhlp.mk4
-rw-r--r--mk/vars.mk13
-rw-r--r--package/ImageMagick/patches/patch-config_ltmain_sh30
-rw-r--r--package/ImageMagick/patches/patch-configure20
-rw-r--r--package/dbus/patches/patch-configure6
-rw-r--r--package/dbus/patches/patch-ltmain_sh30
-rw-r--r--package/eglibc/Makefile5
-rw-r--r--package/fltk/patches/patch-fltk2-config_in27
-rw-r--r--package/gettext/Makefile3
-rw-r--r--package/gettext/patches/patch-build-aux_ltmain_sh30
-rw-r--r--package/gnupg/Makefile1
-rw-r--r--package/irssi/patches/patch-build-aux_ltmain_sh30
-rw-r--r--package/krb5/patches/patch-src_krb5-config_in22
-rw-r--r--package/libelf/Makefile11
-rw-r--r--package/opensc/patches/patch-ltmain_sh30
-rw-r--r--package/opensc/patches/patch-src_Makefile_in6
-rw-r--r--package/rpcbind/patches/patch-ltmain_sh30
-rw-r--r--package/subversion/patches/patch-build_ltmain_sh30
-rw-r--r--target/linux/config/Config.in.netdevice1
-rw-r--r--toolchain/Config.in18
-rw-r--r--toolchain/Makefile6
-rw-r--r--toolchain/binutils/Makefile1
-rw-r--r--toolchain/eglibc/Makefile12
-rw-r--r--toolchain/gcc/Makefile25
-rw-r--r--toolchain/glibc/Makefile11
-rw-r--r--toolchain/glibc/Makefile.inc2
-rw-r--r--toolchain/kernel-headers/Makefile5
-rw-r--r--toolchain/libelf/Makefile31
-rw-r--r--toolchain/libelf/Makefile.inc8
-rw-r--r--toolchain/uClibc/Makefile18
32 files changed, 402 insertions, 78 deletions
diff --git a/TODO b/TODO
index 34fed5d..56959eb 100644
--- a/TODO
+++ b/TODO
@@ -1,20 +1,27 @@
- man pages in ipkg/tgz packages (automatic)
+- automatic healing after move of adk directory (pc,la)
- ccache support for speedup
-- distcc eval
+- distcc evaluation
- GCC SSP evaluation
- LTO GCC evaluation
+- finish qemu package
- fix autoreconf usage in opensc
-- fix timezone stuff in eglibc/glibc
+- fix timezone stuff in glibc
- add back aufs2 patches for kernel
- openssl ocf support check
+- locales support
- new package minidlna
- wget/curl/ftp download support
- fix heimdal package
+- fix or remove bazaar package
- check all patches for CFLAGS compliance, fhonour patch from FreeWRT
+- rpath cleanup
- busybox update and SuSv3 removal
- check rtc support on foxg20
- adkinstall with NTP and hwclock support
- PKG_CONFLICTS for python/python2, is this possible with Kconfig?
- mirror only option, for no internet access
-- add support for brcm 2.6 (lzma/flash/wireless support)
+- add and test brcm 2.6 wireless support
- help text for config/ needs adoption
+- diet libc / klibc / newlib support
+- pcc support? clang+llvm
diff --git a/mk/build.mk b/mk/build.mk
index 9f1841c..7c8a697 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -554,6 +554,7 @@ bulkallmod:
done
${TOPDIR}/bin/tools/pkgmaker:
+ @mkdir -p $(TOPDIR)/bin/tools
@$(HOSTCC) -Wall -g -o $@ tools/adk/pkgmaker.c tools/adk/sortfile.c tools/adk/strmap.c
${TOPDIR}/bin/tools/pkgrebuild:
diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk
index c7c598d..2cb4f17 100644
--- a/mk/buildhlp.mk
+++ b/mk/buildhlp.mk
@@ -24,9 +24,11 @@ else
_CHECKSUM_COOKIE=
endif
-post-extract:
+${PACKAGE_DIR}/.stamps:
@mkdir -p ${PACKAGE_DIR}/.stamps
+post-extract: ${PACKAGE_DIR}/.stamps
+
ifeq ($(strip ${NO_DISTFILES}),1)
${WRKDIST}/.extract_done:
rm -rf ${WRKDIST} ${WRKSRC} ${WRKBUILD}
diff --git a/mk/vars.mk b/mk/vars.mk
index 37461e9..7828347 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -9,14 +9,23 @@ INSTALL_SCRIPT= install -m0755
MAKEFLAGS= $(EXTRA_MAKEFLAGS)
BUILD_USER= $(shell id -un)
BUILD_GROUP= $(shell id -gn)
+
+# target compiler settings
+TARGET_CPPFLAGS+= -I${STAGING_TARGET_DIR}/usr/include
+TARGET_LDFLAGS+= -Wl,-O2
ifneq ($(ADK_DEBUG),)
TARGET_DEBUGGING:= -g3 -fno-omit-frame-pointer
else
-TARGET_DEBUGGING:= -fomit-frame-pointer $(TARGET_OPTIMIZATION)
+TARGET_DEBUGGING:= $(TARGET_OPTIMIZATION) -fomit-frame-pointer
endif
TARGET_CFLAGS:= $(TARGET_CFLAGS_ARCH) $(TARGET_DEBUGGING) -fwrapv
ifneq ($(ADK_TOOLCHAIN_GCC_USE_SSP),)
TARGET_CFLAGS+= -fstack-protector
+TARGET_LDFLAGS+= -fstack-protector
+endif
+ifneq ($(ADK_TOOLCHAIN_GCC_USE_LTO),)
+TARGET_CFLAGS+= -flto
+TARGET_LDFLAGS+= -flto
endif
BASE_DIR:= $(TOPDIR)
@@ -56,8 +65,6 @@ endif
TARGET_CC:= ${TARGET_COMPILER_PREFIX}gcc
TARGET_CXX:= ${TARGET_COMPILER_PREFIX}g++
TARGET_LD:= ${TARGET_COMPILER_PREFIX}ld
-TARGET_CPPFLAGS+= -I${STAGING_TARGET_DIR}/usr/include
-TARGET_LDFLAGS+= -Wl,-O2
PATCH= ${BASH} $(SCRIPT_DIR)/patch.sh
SED:= sed -i -e
LINUX_DIR:= $(BUILD_DIR)/linux
diff --git a/package/ImageMagick/patches/patch-config_ltmain_sh b/package/ImageMagick/patches/patch-config_ltmain_sh
new file mode 100644
index 0000000..3c1be11
--- /dev/null
+++ b/package/ImageMagick/patches/patch-config_ltmain_sh
@@ -0,0 +1,30 @@
+--- ImageMagick-6.6.5-10.orig/config/ltmain.sh 2010-11-21 22:35:22.000000000 +0100
++++ ImageMagick-6.6.5-10/config/ltmain.sh 2011-01-08 23:20:33.000000000 +0100
+@@ -5843,27 +5843,6 @@ func_mode_link ()
+ esac
+ fi
+
+- # Hardcode the library path.
+- # Skip directories that are in the system default run-time
+- # search path.
+- case " $sys_lib_dlsearch_path " in
+- *" $absdir "*) ;;
+- *)
+- case "$compile_rpath " in
+- *" $absdir "*) ;;
+- *) compile_rpath="$compile_rpath $absdir"
+- esac
+- ;;
+- esac
+- case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
+- *)
+- case "$finalize_rpath " in
+- *" $libdir "*) ;;
+- *) finalize_rpath="$finalize_rpath $libdir"
+- esac
+- ;;
+- esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
diff --git a/package/ImageMagick/patches/patch-configure b/package/ImageMagick/patches/patch-configure
deleted file mode 100644
index 717f612..0000000
--- a/package/ImageMagick/patches/patch-configure
+++ /dev/null
@@ -1,20 +0,0 @@
---- ImageMagick-6.6.5-10.orig/configure 2010-11-21 22:36:46.000000000 +0100
-+++ ImageMagick-6.6.5-10/configure 2011-01-07 00:03:54.000000000 +0100
-@@ -14824,7 +14824,7 @@ fi
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
-- hardcode_into_libs=yes
-+ hardcode_into_libs=no
-
- # Add ABI-specific directories to the system library path.
- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
-@@ -18491,7 +18491,7 @@ fi
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
-- hardcode_into_libs=yes
-+ hardcode_into_libs=no
-
- # Add ABI-specific directories to the system library path.
- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
diff --git a/package/dbus/patches/patch-configure b/package/dbus/patches/patch-configure
index f33a192..85521d3 100644
--- a/package/dbus/patches/patch-configure
+++ b/package/dbus/patches/patch-configure
@@ -1,6 +1,6 @@
---- dbus-1.2.16.orig/configure 2009-07-14 21:43:08.000000000 +0200
-+++ dbus-1.2.16/configure 2010-01-15 19:03:24.000000000 +0100
-@@ -25213,19 +25213,6 @@ if test "x$GCC" = "xyes"; then
+--- dbus-1.2.24.orig/configure 2010-03-23 20:11:22.000000000 +0100
++++ dbus-1.2.24/configure 2011-01-08 22:50:31.000000000 +0100
+@@ -25294,19 +25296,6 @@ if test "x$GCC" = "xyes"; then
;;
esac
diff --git a/package/dbus/patches/patch-ltmain_sh b/package/dbus/patches/patch-ltmain_sh
new file mode 100644
index 0000000..b63e1d6
--- /dev/null
+++ b/package/dbus/patches/patch-ltmain_sh
@@ -0,0 +1,30 @@
+--- dbus-1.2.24.orig/ltmain.sh 2010-03-12 23:22:29.000000000 +0100
++++ dbus-1.2.24/ltmain.sh 2011-01-08 22:57:14.000000000 +0100
+@@ -5516,27 +5516,6 @@ func_mode_link ()
+ esac
+ fi
+
+- # Hardcode the library path.
+- # Skip directories that are in the system default run-time
+- # search path.
+- case " $sys_lib_dlsearch_path " in
+- *" $absdir "*) ;;
+- *)
+- case "$compile_rpath " in
+- *" $absdir "*) ;;
+- *) compile_rpath="$compile_rpath $absdir"
+- esac
+- ;;
+- esac
+- case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
+- *)
+- case "$finalize_rpath " in
+- *" $libdir "*) ;;
+- *) finalize_rpath="$finalize_rpath $libdir"
+- esac
+- ;;
+- esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
diff --git a/package/eglibc/Makefile b/package/eglibc/Makefile
index e82e3b7..844b498 100644
--- a/package/eglibc/Makefile
+++ b/package/eglibc/Makefile
@@ -20,10 +20,9 @@ CONFIG_STYLE:= manual
BUILD_STYLE:= manual
INSTALL_STYLE:= manual
-EGLIBC_CONFOPTS:= \
- --build=$(GNU_HOST_NAME) \
+EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
- --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
+ --with-headers=$(STAGING_TARGET_DIR)/usr/include \
--disable-nls \
--without-cvs \
--disable-profile \
diff --git a/package/fltk/patches/patch-fltk2-config_in b/package/fltk/patches/patch-fltk2-config_in
new file mode 100644
index 0000000..c478468
--- /dev/null
+++ b/package/fltk/patches/patch-fltk2-config_in
@@ -0,0 +1,27 @@
+--- fltk-2.0.x-r7513.orig/fltk2-config.in 2006-04-15 19:43:12.000000000 +0200
++++ fltk-2.0.x-r7513/fltk2-config.in 2011-01-08 23:34:40.000000000 +0100
+@@ -77,7 +77,6 @@ LDLIBS="@LDFLAGS@ @LIBS@"
+ # libraries to link with:
+ LIBNAME="@LIBNAME@"
+ DSONAME="@DSONAME@"
+-DSOLINK="@DSOLINK@"
+ IMAGELIBS="@IMAGELIBS@"
+ SHAREDSUFFIX="@SHAREDSUFFIX@"
+
+@@ -168,7 +167,6 @@ do
+ bindir=${exec_prefix}
+ includedir=${prefix}/include
+ libdir=${prefix}/lib
+- DSOLINK="-Wl,-rpath,${prefix}/lib"
+ ;;
+ --prefix)
+ echo_prefix=yes
+@@ -283,7 +281,7 @@ if test x$use_images = xyes; then
+ LDSTATIC="$libdir/libfltk2_images.a $LDSTATIC $IMAGELIBS"
+ fi
+
+-LDLIBS="$DSOLINK $LDLIBS"
++LDLIBS="$LDLIBS"
+ LDSTATIC="$LDSTATIC_PATHS $LDSTATIC"
+
+ # Answer to user requests
diff --git a/package/gettext/Makefile b/package/gettext/Makefile
index 76e73fe..76d47ac 100644
--- a/package/gettext/Makefile
+++ b/package/gettext/Makefile
@@ -18,7 +18,7 @@ ifeq ($(ADK_STATIC),y)
PKG_OPTS:= libonly
endif
-WRKDIST= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}/gettext-runtime
+WRKSRC= ${WRKDIR}/${PKG_NAME}-${PKG_VERSION}/gettext-runtime
include ${TOPDIR}/mk/package.mk
@@ -29,6 +29,7 @@ CONFIGURE_ARGS+= --disable-java \
--disable-csharp \
--enable-nls \
--disable-libasprintf \
+ --disable-rpath \
--enable-threads=posix \
--disable-openmp \
--with-libiconv-prefix='${STAGING_TARGET_DIR}/usr' \
diff --git a/package/gettext/patches/patch-build-aux_ltmain_sh b/package/gettext/patches/patch-build-aux_ltmain_sh
new file mode 100644
index 0000000..9141bd7
--- /dev/null
+++ b/package/gettext/patches/patch-build-aux_ltmain_sh
@@ -0,0 +1,30 @@
+--- gettext-0.18.1.1.orig/build-aux/ltmain.sh 2010-06-06 14:49:57.000000000 +0200
++++ gettext-0.18.1.1/build-aux/ltmain.sh 2011-01-08 23:49:55.000000000 +0100
+@@ -5652,27 +5652,6 @@ func_mode_link ()
+ esac
+ fi
+
+- # Hardcode the library path.
+- # Skip directories that are in the system default run-time
+- # search path.
+- case " $sys_lib_dlsearch_path " in
+- *" $absdir "*) ;;
+- *)
+- case "$compile_rpath " in
+- *" $absdir "*) ;;
+- *) compile_rpath="$compile_rpath $absdir"
+- esac
+- ;;
+- esac
+- case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
+- *)
+- case "$finalize_rpath " in
+- *" $libdir "*) ;;
+- *) finalize_rpath="$finalize_rpath $libdir"
+- esac
+- ;;
+- esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
diff --git a/package/gnupg/Makefile b/package/gnupg/Makefile
index ff37397..d28b2b4 100644
--- a/package/gnupg/Makefile
+++ b/package/gnupg/Makefile
@@ -29,6 +29,7 @@ CONFIGURE_ARGS+= --disable-asm \
--disable-finger \
--disable-ftp \
--disable-dns-srv \
+ --disable-rpath \
--enable-fake-curl \
--disable-regex
diff --git a/package/irssi/patches/patch-build-aux_ltmain_sh b/package/irssi/patches/patch-build-aux_ltmain_sh
new file mode 100644
index 0000000..05bcb0e
--- /dev/null
+++ b/package/irssi/patches/patch-build-aux_ltmain_sh
@@ -0,0 +1,30 @@
+--- irssi-0.8.15.orig/build-aux/ltmain.sh 2010-04-03 18:21:23.000000000 +0200
++++ irssi-0.8.15/build-aux/ltmain.sh 2011-01-09 00:18:54.000000000 +0100
+@@ -5516,27 +5516,6 @@ func_mode_link ()
+ esac
+ fi
+
+- # Hardcode the library path.
+- # Skip directories that are in the system default run-time
+- # search path.
+- case " $sys_lib_dlsearch_path " in
+- *" $absdir "*) ;;
+- *)
+- case "$compile_rpath " in
+- *" $absdir "*) ;;
+- *) compile_rpath="$compile_rpath $absdir"
+- esac
+- ;;
+- esac
+- case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
+- *)
+- case "$finalize_rpath " in
+- *" $libdir "*) ;;
+- *) finalize_rpath="$finalize_rpath $libdir"
+- esac
+- ;;
+- esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
diff --git a/package/krb5/patches/patch-src_krb5-config_in b/package/krb5/patches/patch-src_krb5-config_in
new file mode 100644
index 0000000..ddc0159
--- /dev/null
+++ b/package/krb5/patches/patch-src_krb5-config_in
@@ -0,0 +1,22 @@
+--- krb5-1.8.1.orig/src/krb5-config.in 2010-01-21 23:49:01.000000000 +0100
++++ krb5-1.8.1/src/krb5-config.in 2011-01-09 01:33:14.000000000 +0100
+@@ -34,8 +34,6 @@ libdir=@libdir@
+ CC_LINK='@CC_LINK@'
+ KDB5_DB_LIB=@KDB5_DB_LIB@
+ LDFLAGS='@LDFLAGS@'
+-RPATH_FLAG='@RPATH_FLAG@'
+-PROG_RPATH_FLAGS='@PROG_RPATH_FLAGS@'
+ PTHREAD_CFLAGS='@PTHREAD_CFLAGS@'
+ DL_LIB='@DL_LIB@'
+
+@@ -180,10 +178,7 @@ if test -n "$do_libs"; then
+ # Ugly gross hack for our build tree
+ lib_flags=`echo $CC_LINK | sed -e 's/\$(CC)//' \
+ -e 's/\$(PURE)//' \
+- -e 's#\$(PROG_RPATH_FLAGS)#'"$PROG_RPATH_FLAGS"'#' \
+- -e 's#\$(PROG_RPATH)#'$libdir'#' \
+ -e 's#\$(PROG_LIBPATH)#'$libdirarg'#' \
+- -e 's#\$(RPATH_FLAG)#'"$RPATH_FLAG"'#' \
+ -e 's#\$(LDFLAGS)#'"$LDFLAGS"'#' \
+ -e 's#\$(PTHREAD_CFLAGS)#'"$PTHREAD_CFLAGS"'#' \
+ -e 's#\$(CFLAGS)#'"$CFLAGS"'#'`
diff --git a/package/libelf/Makefile b/package/libelf/Makefile
index a5847bc..c8ae86b 100644
--- a/package/libelf/Makefile
+++ b/package/libelf/Makefile
@@ -2,18 +2,17 @@
# material, please see the LICENCE file in the top-level directory.
include ${TOPDIR}/rules.mk
+include ${TOPDIR}/toolchain/libelf/Makefile.inc
-PKG_NAME:= libelf
-PKG_VERSION:= 0.8.11
-PKG_RELEASE:= 1
-PKG_MD5SUM:= e931910b6d100f6caa32239849947fbf
PKG_DESCR:= elf library
PKG_SECTION:= libs
PKG_SITES:= http://www.mr511.de/software/
+PKG_SUBPKGS:= LIBELF
+
include ${TOPDIR}/mk/package.mk
-$(eval $(call PKG_template,LIBELF,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,LIBELF,libelf,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
CONFIGURE_ENV+= mr_cv_target_elf=yes \
ac_cv_sizeof_long_long=8
@@ -21,7 +20,7 @@ CONFIGURE_ARGS+= --enable-elf64=yes \
--disable-sanity-checks
FAKE_FLAGS+= instroot="${WRKINST}"
-post-install:
+libelf-install:
${INSTALL_DIR} ${IDIR_LIBELF}/usr/lib
${CP} ${WRKINST}/usr/lib/libelf.so* ${IDIR_LIBELF}/usr/lib/
diff --git a/package/opensc/patches/patch-ltmain_sh b/package/opensc/patches/patch-ltmain_sh
new file mode 100644
index 0000000..e36389c
--- /dev/null
+++ b/package/opensc/patches/patch-ltmain_sh
@@ -0,0 +1,30 @@
+--- opensc-0.11.13.orig/ltmain.sh 2011-01-09 00:58:43.000000000 +0100
++++ opensc-0.11.13/ltmain.sh 2011-01-09 00:57:54.000000000 +0100
+@@ -6635,27 +6635,6 @@ func_mode_link ()
+ esac
+ fi
+
+- # Hardcode the library path.
+- # Skip directories that are in the system default run-time
+- # search path.
+- case " $sys_lib_dlsearch_path " in
+- *" $absdir "*) ;;
+- *)
+- case "$compile_rpath " in
+- *" $absdir "*) ;;
+- *) func_append compile_rpath " $absdir" ;;
+- esac
+- ;;
+- esac
+- case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
+- *)
+- case "$finalize_rpath " in
+- *" $libdir "*) ;;
+- *) func_append finalize_rpath " $libdir" ;;
+- esac
+- ;;
+- esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
diff --git a/package/opensc/patches/patch-src_Makefile_in b/package/opensc/patches/patch-src_Makefile_in
index 63d41a2..f289167 100644
--- a/package/opensc/patches/patch-src_Makefile_in
+++ b/package/opensc/patches/patch-src_Makefile_in
@@ -1,6 +1,6 @@
---- opensc-0.11.13.orig/src/Makefile.in 2010-02-16 10:32:17.000000000 +0100
-+++ opensc-0.11.13/src/Makefile.in 2010-12-15 21:48:57.000000000 +0100
-@@ -260,8 +260,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefil
+--- opensc-0.11.13.orig/src/Makefile.in 2011-01-09 00:58:50.000000000 +0100
++++ opensc-0.11.13/src/Makefile.in 2011-01-09 00:56:00.000000000 +0100
+@@ -263,8 +263,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefil
EXTRA_DIST = Makefile.mak
# Order IS important
diff --git a/package/rpcbind/patches/patch-ltmain_sh b/package/rpcbind/patches/patch-ltmain_sh
new file mode 100644
index 0000000..1f5fa84
--- /dev/null
+++ b/package/rpcbind/patches/patch-ltmain_sh
@@ -0,0 +1,30 @@
+--- rpcbind-0.2.0.orig/ltmain.sh 2008-08-30 00:27:25.000000000 +0200
++++ rpcbind-0.2.0/ltmain.sh 2011-01-09 00:48:19.000000000 +0100
+@@ -2561,27 +2561,6 @@ EOF
+ esac
+ fi
+
+- # Hardcode the library path.
+- # Skip directories that are in the system default run-time
+- # search path.
+- case " $sys_lib_dlsearch_path " in
+- *" $absdir "*) ;;
+- *)
+- case "$compile_rpath " in
+- *" $absdir "*) ;;
+- *) compile_rpath="$compile_rpath $absdir"
+- esac
+- ;;
+- esac
+- case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
+- *)
+- case "$finalize_rpath " in
+- *" $libdir "*) ;;
+- *) finalize_rpath="$finalize_rpath $libdir"
+- esac
+- ;;
+- esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
diff --git a/package/subversion/patches/patch-build_ltmain_sh b/package/subversion/patches/patch-build_ltmain_sh
new file mode 100644
index 0000000..b9315f8
--- /dev/null
+++ b/package/subversion/patches/patch-build_ltmain_sh
@@ -0,0 +1,30 @@
+--- subversion-1.6.12.orig/build/ltmain.sh 2010-03-31 20:37:12.000000000 +0200
++++ subversion-1.6.12/build/ltmain.sh 2011-01-09 01:50:49.000000000 +0100
+@@ -2561,27 +2561,6 @@ EOF
+ esac
+ fi
+
+- # Hardcode the library path.
+- # Skip directories that are in the system default run-time
+- # search path.
+- case " $sys_lib_dlsearch_path " in
+- *" $absdir "*) ;;
+- *)
+- case "$compile_rpath " in
+- *" $absdir "*) ;;
+- *) compile_rpath="$compile_rpath $absdir"
+- esac
+- ;;
+- esac
+- case " $sys_lib_dlsearch_path " in
+- *" $libdir "*) ;;
+- *)
+- case "$finalize_rpath " in
+- *" $libdir "*) ;;
+- *) finalize_rpath="$finalize_rpath $libdir"
+- esac
+- ;;
+- esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
diff --git a/target/linux/config/Config.in.netdevice b/target/linux/config/Config.in.netdevice
index 40573a7..e7ff2be 100644
--- a/target/linux/config/Config.in.netdevice
+++ b/target/linux/config/Config.in.netdevice
@@ -319,6 +319,7 @@ config ADK_KPACKAGE_KMOD_B43
tristate
select ADK_KPACKAGE_KMOD_FW_LOADER
depends on ADK_TARGET_WITH_SSB || ADK_TARGET_WITH_MINIPCI
+ default y if ADK_TARGET_SYSTEM_LINKSYS_WRT54G
default n
help
Driver for Broadcom B43xx wireless chips.
diff --git a/toolchain/Config.in b/toolchain/Config.in
index b85fd60..06f0c46 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -15,6 +15,11 @@ config ADK_TOOLCHAIN_GCC_JAVA
boolean
default n
+config ADK_TOOLCHAIN_GCC_OBJC
+ prompt "Enable building of Objective C compiler"
+ boolean
+ default n
+
config ADK_TOOLCHAIN_GCC_SSP
prompt "Enable Stack Smashing Protection in GCC"
boolean
@@ -25,5 +30,16 @@ config ADK_TOOLCHAIN_GCC_USE_SSP
boolean
depends on ADK_TOOLCHAIN_GCC_SSP
default n
-
+
+config ADK_TOOLCHAIN_GCC_LTO
+ prompt "Enable Link Time Optimization in GCC"
+ boolean
+ default n
+
+config ADK_TOOLCHAIN_GCC_USE_LTO
+ prompt "Use Link Time Optimization for all packages"
+ boolean
+ depends on ADK_TOOLCHAIN_GCC_LTO
+ default n
+
endmenu
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 34bd572..e3c04a8 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -3,7 +3,7 @@
#
# Steps to build toolchains
# 1) build and install binutils
-# 2) build and install mpfr, mpc and gmp
+# 2) build and install mpfr, mpc, libelf and gmp
# 3) build and install gcc c compiler
# 4) install kernel-headers
# 5) install libc headers
@@ -13,7 +13,7 @@
include $(TOPDIR)/rules.mk
-TARGETS:=binutils gmp mpfr mpc gcc
+TARGETS:=binutils gmp mpfr mpc libelf gcc
ifeq ($(ADK_TARGET_LIB_GLIBC),y)
TARGETS+=glibc-ports glibc
LIBC:=glibc
@@ -38,7 +38,7 @@ install: $(TARGETS_INSTALL)
clean: $(TARGETS_CLEAN)
download: $(DOWNLOAD)
-gcc-prepare: binutils-install gmp-install mpfr-install mpc-install
+gcc-prepare: binutils-install gmp-install mpfr-install mpc-install libelf-install
ifeq ($(ADK_TARGET_LIB_GLIBC),y)
$(LIBC)-prepare: gcc-prepare kernel-headers-prepare glibc-ports-prepare
else
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 2b0137d..cc8c1b2 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -28,7 +28,6 @@ $(WRKBUILD)/.configured:
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
- --with-sysroot=$(TOOLCHAIN_SYSROOT) \
--with-sysroot=$(STAGING_TARGET_DIR) \
--disable-multilib \
--disable-dependency-tracking \
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index 2db3fa6..c5f2a56 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -50,8 +50,8 @@ $(WRKBUILD)/.headers_configure:
(cd $(EGLIBC_BUILD_DIR_INITIAL); \
${EGLIBC_ENV} \
$(WRKBUILD)/libc/configure \
- --prefix=$(TOOLCHAIN_SYSROOT)/usr \
- --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
+ --prefix=$(STAGING_TARGET_DIR)/usr \
+ --with-headers=$(STAGING_TARGET_DIR)/usr/include \
${EGLIBC_CONFOPTS} \
);
touch $@
@@ -61,9 +61,15 @@ $(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
PATH='${TARGET_PATH}' \
$(MAKE) install-headers install-bootstrap-headers=yes \
);
- touch $(TOOLCHAIN_SYSROOT)/usr/include/gnu/stubs.h
+ touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
touch $@
+ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+EGLIBC_ENV+= libc_cv_ssp=yes
+else
+EGLIBC_ENV+= libc_cv_ssp=no
+endif
+
$(WRKBUILD)/.configured:
mkdir -p $(EGLIBC_BUILD_DIR_FINAL)
$(CP) ${TOPDIR}/toolchain/eglibc/eglibc.config \
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index b881473..afb9450 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -11,6 +11,7 @@ GCC_CONFOPTS= --prefix=$(STAGING_HOST_DIR) \
--target=$(REAL_GNU_TARGET_NAME) \
--with-gmp=$(STAGING_HOST_DIR) \
--with-mpfr=$(STAGING_HOST_DIR) \
+ --with-libelf=$(STAGING_HOST_DIR) \
--disable-__cxa_atexit \
--with-gnu-ld \
--disable-libmudflap \
@@ -32,6 +33,12 @@ else
GCC_CONFOPTS+= --disable-libssp
endif
+ifeq ($(ADK_TOOLCHAIN_GCC_LTO),y)
+GCC_CONFOPTS+= --enable-lto
+else
+GCC_CONFOPTS+= --disable-lto
+endif
+
ifeq ($(ARCH),cris)
GCC_CONFOPTS+= --disable-tls
else
@@ -67,6 +74,9 @@ endif
ifeq ($(ADK_TOOLCHAIN_GCC_JAVA),y)
LANGUAGES:=${LANGUAGES},java
endif
+ifeq ($(ADK_TOOLCHAIN_GCC_ADA),y)
+LANGUAGES:=${LANGUAGES},ada
+endif
include ${TOPDIR}/mk/buildhlp.mk
@@ -76,7 +86,7 @@ GCC_BUILD_DIR_FINAL:= $(WRKBUILD)-final
$(GCC_BUILD_DIR_MINIMAL)/.configured:
mkdir -p $(GCC_BUILD_DIR_MINIMAL)
- (cd $(GCC_BUILD_DIR_MINIMAL); rm -f config.cache; \
+ (cd $(GCC_BUILD_DIR_MINIMAL); \
PATH='$(TARGET_PATH)' \
$(WRKBUILD)/configure \
${GCC_CONFOPTS} \
@@ -98,12 +108,8 @@ $(WRKBUILD)/.headers: $(GCC_BUILD_DIR_MINIMAL)/.compiled
touch $@
$(GCC_BUILD_DIR_INITIAL)/.configured:
- rm -rf $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
- ln -sf ${STAGING_TARGET_DIR}/include $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
- rm -rf ${STAGING_HOST_DIR}/$(REAL_GNU_TARGET_NAME)/lib
- ln -sf ${STAGING_TARGET_DIR}/lib $(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME)/lib
mkdir -p $(GCC_BUILD_DIR_INITIAL)
- (cd $(GCC_BUILD_DIR_INITIAL); rm -f config.cache; \
+ (cd $(GCC_BUILD_DIR_INITIAL); \
PATH='$(TARGET_PATH)' \
$(WRKBUILD)/configure \
${GCC_CONFOPTS} \
@@ -111,7 +117,7 @@ $(GCC_BUILD_DIR_INITIAL)/.configured:
--disable-shared \
--disable-threads \
--with-newlib \
- --with-sysroot=$(TOOLCHAIN_SYSROOT) \
+ --with-sysroot=$(STAGING_TARGET_DIR) \
);
touch $@
@@ -128,7 +134,7 @@ $(WRKBUILD)/.configured: $(GCC_BUILD_DIR_INITIAL)/.compiled
$(GCC_BUILD_DIR_FINAL)/.configured:
mkdir -p $(GCC_BUILD_DIR_FINAL)
- (cd $(GCC_BUILD_DIR_FINAL); rm -f config.cache; \
+ (cd $(GCC_BUILD_DIR_FINAL); \
PATH='$(TARGET_PATH)' \
$(WRKBUILD)/configure \
${GCC_CONFOPTS} \
@@ -146,9 +152,6 @@ $(WRKBUILD)/.compiled: $(GCC_BUILD_DIR_FINAL)/.configured
$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
PATH='$(TARGET_PATH)' $(MAKE) -C $(GCC_BUILD_DIR_FINAL) install
- # workaround if you cross-compile binutils
- @-rm $(STAGING_TARGET_DIR)/lib/libiberty.a
- @-rm $(STAGING_TARGET_DIR)/usr/lib/libiberty.a
# Set up the symlinks to enable lying about target name.
set -e; \
(cd $(STAGING_HOST_DIR); \
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index 4d39e2b..96dc993 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -31,21 +31,21 @@ $(WRKBUILD)/.headers_configure:
(cd $(GLIBC_BUILD_DIR_INITIAL); \
${GLIBC_ENV} \
$(WRKBUILD)/configure \
- --prefix=$(TOOLCHAIN_SYSROOT)/usr \
- --with-sysroot=$(TOOLCHAIN_SYSROOT) \
+ --prefix=$(STAGING_TARGET_DIR)/usr \
+ --with-sysroot=$(STAGING_TARGET_DIR) \
${GLIBC_CONFOPTS} \
);
touch $@
$(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure
- mkdir -p $(TOOLCHAIN_SYSROOT)/usr/lib
+ mkdir -p $(STAGING_TARGET_DIR)/usr/lib
(cd $(GLIBC_BUILD_DIR_INITIAL); \
${GLIBC_ENV} \
$(MAKE) ${GLIBC_MAKEOPTS} \
cross-compiling=yes \
install-headers \
);
- touch $(TOOLCHAIN_SYSROOT)/usr/include/gnu/stubs.h
+ touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
touch $@
$(WRKBUILD)/.configured:
@@ -67,7 +67,6 @@ $(WRKBUILD)/.compiled:
$(WRKBUILD)/.installed:
${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL) \
install_root=$(STAGING_TARGET_DIR) install
- touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h
- touch $(WRKBUILD)/.installed
+ touch $@
include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc
index ff47534..d7bcecb 100644
--- a/toolchain/glibc/Makefile.inc
+++ b/toolchain/glibc/Makefile.inc
@@ -9,7 +9,7 @@ PKG_SITES:= ${MASTER_SITE_GNU:=glibc/}
GLIBC_PORTS_VERSION:= 2.12
GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
- --with-headers=$(TOOLCHAIN_SYSROOT)/usr/include \
+ --with-headers=$(STAGING_TARGET_DIR)/usr/include \
--disable-nls \
--disable-sanity-checks \
--disable-nls \
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 45160fa..81c2b65 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -11,9 +11,6 @@ $(WRKBUILD)/.headers:
INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr \
headers_install
$(MAKE) -C $(WRKBUILD) HOSTCC=$(HOSTCC) ARCH=$(ARCH) V=1 \
- INSTALL_HDR_PATH=$(TOOLCHAIN_SYSROOT)/usr \
- headers_install
- $(MAKE) -C $(WRKBUILD) HOSTCC=$(HOSTCC) ARCH=$(ARCH) V=1 \
INSTALL_HDR_PATH=$(LINUX_HEADER_DIR) \
headers_install
# cryptodev.h from ocf-linux-20080917
@@ -22,10 +19,8 @@ $(WRKBUILD)/.headers:
ifeq ($(ARCH),cris)
ifeq ($(CPU_ARCH),crisv32)
cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v32/arch arch
- cd $(TOOLCHAIN_SYSROOT)/usr/include && ln -sf arch-v32/arch arch
else
cd $(STAGING_TARGET_DIR)/usr/include && ln -sf arch-v10/arch arch
- cd $(TOOLCHAIN_SYSROOT)/usr/include && ln -sf arch-v10/arch arch
endif
endif
touch $@
diff --git a/toolchain/libelf/Makefile b/toolchain/libelf/Makefile
new file mode 100644
index 0000000..485978c
--- /dev/null
+++ b/toolchain/libelf/Makefile
@@ -0,0 +1,31 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+include Makefile.inc
+include ../rules.mk
+include ${TOPDIR}/mk/buildhlp.mk
+
+ifeq (${ADK_MAKE_PARALLEL},y)
+LIBELF_MAKEOPTS+= -j${ADK_MAKE_JOBS}
+endif
+
+$(WRKBUILD)/.headers:
+$(WRKBUILD)/.configured:
+ (cd $(WRKBUILD); \
+ $(WRKBUILD)/configure \
+ --prefix=$(STAGING_HOST_DIR) \
+ --disable-shared \
+ --enable-static \
+ );
+ touch $@
+
+$(WRKBUILD)/.compiled: $(WRKBUILD)/.configured
+ $(MAKE) ${LIBELF_MAKEOPTS} -C $(WRKBUILD) all
+ touch $@
+
+$(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
+ $(MAKE) -C $(WRKBUILD) install
+ touch $@
+
+include ${TOPDIR}/mk/toolchain.mk
diff --git a/toolchain/libelf/Makefile.inc b/toolchain/libelf/Makefile.inc
new file mode 100644
index 0000000..66ca9fd
--- /dev/null
+++ b/toolchain/libelf/Makefile.inc
@@ -0,0 +1,8 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+PKG_NAME:= libelf
+PKG_VERSION:= 0.8.13
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 4136d7b4c04df68b686570afa26988ac
+PKG_SITES:= http://www.mr511.de/software/
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index e04985d..cc63b9e 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -14,18 +14,28 @@ endif
$(WRKBUILD)/.headers:
$(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(WRKBUILD)/Rules.mak
- sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${TOOLCHAIN_SYSROOT}/usr/include\"' \
+ sed -e 's^KERNEL_HEADERS.*$$KERNEL_HEADERS=\"${STAGING_TARGET_DIR}/usr/include\"' \
$(TOPDIR)/target/$(ADK_TARGET_ARCH)/uclibc.config >${WRKBUILD}/.config
ifneq ($(ADK_DEBUG),)
$(SED) 's,DOSTRIP,DODEBUG,' ${WRKBUILD}/.config
endif
-ifneq ($(ADK_TOOLCHAIN_GCC_SSP),)
+ifneq ($(ADK_TOOLCHAIN_GCC_USE_SSP),)
$(SED) 's,.*UCLIBC_HAS_SSP,UCLIBC_HAS_SSP=y,' ${WRKBUILD}/.config
+ echo "UCLIBC_HAS_SSP_COMPAT=n" >> ${WRKBUILD}/.config
+ echo "SSP_QUICK_CANARY=n" >> ${WRKBUILD}/.config
+ echo "UCLIBC_BUILD_SSP=y" >> ${WRKBUILD}/.config
endif
+ echo N|$(MAKE) ${UCLIBC_MAKEOPTS} -C $(WRKBUILD) \
+ PREFIX=$(STAGING_TARGET_DIR) \
+ DEVEL_PREFIX=/usr/ \
+ RUNTIME_PREFIX=$(STAGING_TARGET_DIR) \
+ HOSTCC="$(HOSTCC)" \
+ CPU_CFLAGS="$(TARGET_CFLAGS)" \
+ oldconfig
$(MAKE) ${UCLIBC_MAKEOPTS} -C $(WRKBUILD) \
- PREFIX=$(TOOLCHAIN_SYSROOT) \
+ PREFIX=$(STAGING_TARGET_DIR) \
DEVEL_PREFIX=/usr/ \
- RUNTIME_PREFIX=$(TOOLCHAIN_SYSROOT) \
+ RUNTIME_PREFIX=$(STAGING_TARGET_DIR) \
HOSTCC="$(HOSTCC)" \
CPU_CFLAGS="$(TARGET_CFLAGS)" \
install_headers