Forráskód Böngészése

Merge branch 'master' of git+ssh://openadk.org/git/openadk

Waldemar Brodkorb 12 éve
szülő
commit
e718329929

+ 4 - 3
package/bc/Makefile

@@ -9,6 +9,7 @@ PKG_RELEASE:=		1
 PKG_MD5SUM:=		d44b5dddebd8a7a7309aea6c36fda117
 PKG_DESCR:=		An arbitrary precision calculator language
 PKG_SECTION:=		utils
+PKG_BUILDDEP:=		flex-host
 PKG_URL:=		http://www.gnu.org/software/bc/
 PKG_SITES:=		http://ftp.gnu.org/pub/gnu/bc/
 
@@ -19,11 +20,11 @@ include ${TOPDIR}/mk/package.mk
 $(eval $(call PKG_template,BC,bc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 $(eval $(call PKG_template,DC,dc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
-post-install:
-	# bc
+bc-install:
 	${INSTALL_DIR} ${IDIR_BC}/usr/bin
 	${INSTALL_BIN} ${WRKBUILD}/bc/bc ${IDIR_BC}/usr/bin/bc
-	# dc
+
+dc-install:
 	${INSTALL_DIR} ${IDIR_DC}/usr/bin
 	${INSTALL_BIN} ${WRKBUILD}/dc/dc ${IDIR_DC}/usr/bin/dc
 

+ 6 - 1
package/flex/Makefile

@@ -9,15 +9,19 @@ PKG_RELEASE:=		1
 PKG_MD5SUM:=		201d3f38758d95436cbc64903386de0b
 PKG_DESCR:=		fast lexical analyzer
 PKG_SECTION:=		lang
-PKG_BUILDDEP:=		m4-host
+PKG_BUILDDEP:=		m4-host flex-host
 PKG_URL:=		http://flex.sourceforge.net/
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=${PKG_NAME}/}
 PKG_OPTS:=		dev
 
+include ${TOPDIR}/mk/host.mk
 include ${TOPDIR}/mk/package.mk
 
+$(eval $(call HOST_template,FLEX,flex,${PKG_VERSION}-${PKG_RELEASE}))
 $(eval $(call PKG_template,FLEX,flex,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
+HOST_STYLE:=		auto
+
 flex-install:
 	${INSTALL_DIR} ${IDIR_FLEX}/usr/bin
 	${INSTALL_BIN} ${WRKINST}/usr/bin/flex ${IDIR_FLEX}/usr/bin
@@ -26,4 +30,5 @@ flex-install:
 	${CP} ${WRKINST}/usr/lib/libfl.a \
 		${IDIR_FLEX_DEV}/usr/lib
 
+include ${TOPDIR}/mk/host-bottom.mk
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 12 - 0
package/glibc/Makefile

@@ -52,13 +52,25 @@ glibc-dev-install:
 	# install linker script
 	-cp ./files/libc.so.$(CPU_ARCH) $(IDIR_GLIBC_DEV)/usr/lib/libc.so
 ifeq ($(ADK_TARGET_ABI_O32),y)
+ifeq ($(ADK_big),y)
+	$(SED) "s#@@ELFFORMAT@@#elf32-tradbigmips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+else
 	$(SED) "s#@@ELFFORMAT@@#elf32-tradlittlemips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
 endif
+endif
 ifeq ($(ADK_TARGET_ABI_N32),y)
+ifeq ($(ADK_big),y)
+	$(SED) "s#@@ELFFORMAT@@#elf32-ntradbigmips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+else
 	$(SED) "s#@@ELFFORMAT@@#elf32-ntradlittlemips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
 endif
+endif
 ifeq ($(ADK_TARGET_ABI_N64),y)
+ifeq ($(ADK_big),y)
+	$(SED) "s#@@ELFFORMAT@@#elf64-tradbigmips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+else
 	$(SED) "s#@@ELFFORMAT@@#elf64-tradlittlemips#" $(IDIR_GLIBC_DEV)/usr/lib/libc.so
+endif
 endif
 	${CP} ${STAGING_TARGET_DIR}/usr/lib/crt* ${IDIR_GLIBC_DEV}/usr/lib
 	${CP} ${STAGING_TARGET_DIR}/usr/lib/libc_nonshared.a ${IDIR_GLIBC_DEV}/usr/lib

+ 5 - 0
package/glibc/files/libc.so.i586

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+   the static library, so try that secondarily.  */
+OUTPUT_FORMAT(elf32-i386)
+GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )

+ 5 - 0
package/glibc/files/libc.so.i686

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+   the static library, so try that secondarily.  */
+OUTPUT_FORMAT(elf32-i386)
+GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.2 ) )

+ 5 - 0
package/glibc/files/libc.so.mips

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+      the static library, so try that secondarily.  */
+      OUTPUT_FORMAT(@@ELFTARGET@@)
+      GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld.so.1 ) )

+ 5 - 0
package/glibc/files/libc.so.mips64

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+      the static library, so try that secondarily.  */
+      OUTPUT_FORMAT(@@ELFTARGET@@)
+      GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld.so.1 ) )

+ 5 - 0
package/glibc/files/libc.so.mips64el

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+      the static library, so try that secondarily.  */
+      OUTPUT_FORMAT(@@ELFTARGET@@)
+      GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld.so.1 ) )

+ 5 - 0
package/glibc/files/libc.so.mipsel

@@ -0,0 +1,5 @@
+/* GNU ld script
+   Use the shared library, but some functions are only in
+      the static library, so try that secondarily.  */
+      OUTPUT_FORMAT(@@ELFTARGET@@)
+      GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld.so.1 ) )

+ 2 - 0
target/config/Config.in

@@ -91,6 +91,7 @@ depends on ADK_TARGET_KERNEL64 && ADK_LINUX_MIPS
 config ADK_TARGET_ABI_N32
 	boolean "N32 ABI (new)"
 	select ADK_n32
+	depends on !ADK_TARGET_LIB_MUSL
 
 config ADK_TARGET_ABI_O32
 	boolean "O32 ABI (old)"
@@ -99,6 +100,7 @@ config ADK_TARGET_ABI_O32
 config ADK_TARGET_ABI_N64
 	boolean "N64 ABI"
 	select ADK_n64
+	depends on !ADK_TARGET_LIB_MUSL
 
 endchoice
 

+ 12 - 0
toolchain/musl/patches/mips64.patch

@@ -0,0 +1,12 @@
+diff -Nur musl-0.9.14.orig/configure musl-0.9.14/configure
+--- musl-0.9.14.orig/configure	2013-09-23 23:01:11.000000000 +0200
++++ musl-0.9.14/configure	2013-11-09 20:16:14.000000000 +0100
+@@ -225,7 +225,7 @@
+ arm*) ARCH=arm ;;
+ i?86*) ARCH=i386 ;;
+ x86_64*) ARCH=x86_64 ;;
+-mips-*|mipsel-*) ARCH=mips ;;
++mips-*|mipsel-*|mips64-*|mips64el-*) ARCH=mips ;;
+ microblaze-*) ARCH=microblaze ;;
+ powerpc-*) ARCH=powerpc ;;
+ unknown) fail "$0: unable to detect target arch; try $0 --target=..." ;;