diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/pcc-libs/Makefile | 29 | ||||
-rw-r--r-- | package/pcc-libs/patches/100-adk.patch | 12 | ||||
-rw-r--r-- | package/pcc-libs/patches/patch-csu_linux_crtbegin_c | 35 | ||||
-rw-r--r-- | package/pcc-libs/patches/patch-csu_linux_crtend_c | 32 |
4 files changed, 108 insertions, 0 deletions
diff --git a/package/pcc-libs/Makefile b/package/pcc-libs/Makefile new file mode 100644 index 000000000..9533b97c9 --- /dev/null +++ b/package/pcc-libs/Makefile @@ -0,0 +1,29 @@ +# 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 + +PKG_NAME:= pcc-libs +PKG_VERSION:= 1.0.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a8dfcd6d3be512bc3f16f96c9abf132e +PKG_DESCR:= Runtime for the Portable C Compiler +PKG_SECTION:= lang +PKG_URL:= http://pcc.ludd.ltu.se/ +PKG_SITES:= http://pcc.ludd.ltu.se/ftp/pub/pcc-releases/ + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,PCC_LIBS,pcc-libs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +# we cross-compile a native compiler for the target system +CONFIGURE_ARGS+= --host=${REAL_GNU_TARGET_NAME} +CONFIGURE_ARGS+= --target=${REAL_GNU_TARGET_NAME} + +pcc-libs-install: + $(INSTALL_DIR) $(IDIR_PCC_LIBS)/usr/bin + cd ${WRKINST} && cp -r * ${IDIR_PCC_LIBS}/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pcc-libs/patches/100-adk.patch b/package/pcc-libs/patches/100-adk.patch new file mode 100644 index 000000000..a588900d9 --- /dev/null +++ b/package/pcc-libs/patches/100-adk.patch @@ -0,0 +1,12 @@ +diff -pur pcc-libs-1.0.0~/csu/linux/Makefile pcc-libs-1.0.0/csu/linux/Makefile +--- pcc-libs-1.0.0.orig/csu/linux/Makefile 2009-08-13 11:16:46.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/Makefile 2011-04-07 20:36:10.068600370 +0200 +@@ -4,7 +4,7 @@ VERSION ?= 0.9.9 + PCCLIBDIR ?= /usr/local/lib/pcc/$(TARGET)/$(VERSION)/lib + SRCDIR ?= . + +-CFLAGS = -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes ++CFLAGS += -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes + + OBJS = crt0.o crt1.o gcrt1.o crti.o crtn.o crtbegin.o crtend.o + diff --git a/package/pcc-libs/patches/patch-csu_linux_crtbegin_c b/package/pcc-libs/patches/patch-csu_linux_crtbegin_c new file mode 100644 index 000000000..a4f9777b3 --- /dev/null +++ b/package/pcc-libs/patches/patch-csu_linux_crtbegin_c @@ -0,0 +1,35 @@ +--- pcc-libs-1.0.0.orig/csu/linux/crtbegin.c 2009-08-17 01:07:07.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/crtbegin.c 2011-04-12 08:36:48.951412645 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp $ */ ++/* $Id: crtbegin.c,v 1.7 2011/04/12 04:44:19 gmcgarry Exp $ */ + /*- + * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. + * All rights reserved. +@@ -40,16 +40,16 @@ void __do_global_dtors_aux(void); + extern void (*__CTOR_LIST__[1])(void); + extern void (*__DTOR_LIST__[1])(void); + +-asm( " .section .ctors\n" +- " .align 2\n" ++asm( " .section .ctors,\"aw\",@progbits\n" ++ " .align 4\n" + "__CTOR_LIST__:\n" + #ifdef __x86_64__ + " .quad -1\n" + #else + " .long -1\n" + #endif +- " .section .dtors\n" +- " .align 2\n" ++ " .section .dtors,\"aw\",@progbits\n" ++ " .align 4\n" + "__DTOR_LIST__:\n" + #ifdef __x86_64__ + " .quad -1\n" +@@ -120,4 +120,4 @@ void __call_##func(void) \ + MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux) + MD_CALL_STATIC_FUNCTION(.fini, __do_global_dtors_aux) + +-IDENT("$Id: crtbegin.c,v 1.6 2009/08/16 23:07:07 gmcgarry Exp $"); ++IDENT("$Id: crtbegin.c,v 1.7 2011/04/12 04:44:19 gmcgarry Exp $"); diff --git a/package/pcc-libs/patches/patch-csu_linux_crtend_c b/package/pcc-libs/patches/patch-csu_linux_crtend_c new file mode 100644 index 000000000..257f7138f --- /dev/null +++ b/package/pcc-libs/patches/patch-csu_linux_crtend_c @@ -0,0 +1,32 @@ +--- pcc-libs-1.0.0.orig/csu/linux/crtend.c 2009-08-17 01:07:07.000000000 +0200 ++++ pcc-libs-1.0.0/csu/linux/crtend.c 2011-04-12 08:36:48.951412645 +0200 +@@ -1,4 +1,4 @@ +-/* $Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp $ */ ++/* $Id: crtend.c,v 1.4 2011/04/12 04:44:19 gmcgarry Exp $ */ + /*- + * Copyright (c) 2008 Gregory McGarry <g.mcgarry@ieee.org> + * +@@ -17,7 +17,7 @@ + + #include "common.h" + +-asm( " .section .ctors\n" ++asm( " .section .ctors,\"aw\",@progbits\n" + #ifdef __x86_64__ + " .quad 0\n" + #else +@@ -25,7 +25,7 @@ asm( " .section .ctors\n" + #endif + ); + +-asm( " .section .dtors\n" ++asm( " .section .dtors,\"aw\",@progbits\n" + #ifdef __x86_64__ + " .quad 0\n" + #else +@@ -33,4 +33,4 @@ asm( " .section .dtors\n" + #endif + ); + +-IDENT("$Id: crtend.c,v 1.3 2009/08/16 23:07:07 gmcgarry Exp $"); ++IDENT("$Id: crtend.c,v 1.4 2011/04/12 04:44:19 gmcgarry Exp $"); |