BUILDBOT: Add toolchain for GP2X

Co-Authored-By: Cameron Cawley <ccawley2011@gmail.com>
This commit is contained in:
Le PhilousopheandCameron Cawley committed 2020-08-23 13:22:05 +02:00
1 parent f4f9d507f9
commit ed33ed8a74
13 files changed
+6755

No files matched your search

+36
View File
@@ -241,6 +241,42 @@ def gamecube():
register_platform(platform)
gamecube()
def gp2x():
def setup(p):
platform.workerimage = "open2x"
platform.compatibleBuilds = (builds.ScummVMBuild, )
platform.env["CXX"] = "ccache /opt/open2x/bin/arm-open2x-linux-g++"
# Override CXXFLAGS to avoid warnings about redundant setting between -march and -mcpu
platform.env["CXXFLAGS"] = "-O3 -ffast-math -fomit-frame-pointer"
platform.configureargs.append("--host=gp2x")
platform.packaging_cmd = "gp2x-bundle"
platform.built_files = {
builds.ScummVMBuild: [ "release/scummvm-gp2x.tar.bz2" ],
}
platform.archiveext = "tar.bz2"
platform.testable = False
platform.run_tests = False
platform = Platform("gp2x-1")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-vkeybd",
# Disable big engines
"--disable-engines=glk,lastexpress,titanic,tsage,ultima" ],
}
setup(platform)
register_platform(platform)
platform = Platform("gp2x-2")
platform.buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-vkeybd",
# Only the other ones
"--disable-all-engines",
"--enable-engines=glk,lastexpress,titanic,tsage,ultima" ],
}
setup(platform)
register_platform(platform)
gp2x()
def nds():
platform = Platform("nds")
platform.workerimage = "devkitnds"
+73
View File
@@ -0,0 +1,73 @@
FROM toolchains/common AS helpers
m4_include(`paths.m4')m4_dnl
m4_include(`packages.m4')m4_dnl
FROM debian:stable-slim
USER root
WORKDIR /usr/src
# Copy and execute each step separately to avoid invalidating cache
COPY --from=helpers /lib-helpers/prepare.sh lib-helpers/
RUN lib-helpers/prepare.sh
COPY --from=helpers /lib-helpers/functions.sh lib-helpers/
COPY functions-platform.sh lib-helpers/
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bison \
flex \
gcc \
subversion && \
rm -rf /var/lib/apt/lists/*
ENV HOST=arm-open2x-linux PREFIX=/opt/open2x
local_package(toolchain)
ENV \
def_binaries(`${PREFIX}/bin/${HOST}-', `ar, as, c++filt, ld, nm, objcopy, objdump, ranlib, readelf, strings, strip') \
def_binaries(`${PREFIX}/bin/${HOST}-', `gcc, cpp, c++') \
CC=${PREFIX}/bin/$HOST-gcc \
def_aclocal(`${PREFIX}') \
def_pkg_config(`${PREFIX}') \
PATH=$PATH:${PREFIX}/bin \
CPPFLAGS="-I${PREFIX}/include -DDISABLE_X11 -DARM -D_ARM_ASSEM_" \
CFLAGS="-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t" \
CXXFLAGS="-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t" \
LDFLAGS="-L${PREFIX}/lib"
helpers_package(zlib)
helpers_package(libpng1.6)
helpers_package(libjpeg-turbo)
helpers_package(faad2)
helpers_package(libmad)
helpers_package(libogg)
helpers_package(libtheora)
helpers_package(libvorbisidec)
helpers_package(flac)
COPY packages/mpeg2dec lib-helpers/packages/mpeg2dec
helpers_package(mpeg2dec)
helpers_package(a52dec)
helpers_package(freetype)
helpers_package(fribidi)
local_package(libsdl)
# fluidsynth-lite is unlikely to be fast enough.
# The GP2X doesn't have network capabilities, so don't bother with sdl-net1.2 or curl
+8
View File
@@ -0,0 +1,8 @@
do_svn_fetch () {
if [ -d "$1"*/ ]; then
rm -rf "$1"*/
fi
svn export -r "$3" "$2" "$1"
cd "$1"*/
do_patch
}
+32
View File
@@ -0,0 +1,32 @@
#! /bin/sh
# Be careful, this version has been chosen by open2x
# 1.2.13 has been proposed but never switched on
SDL_VERSION=1.2.11
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
HELPERS_DIR=$PACKAGE_DIR/../..
. $HELPERS_DIR/functions.sh
do_make_bdir
# GPG key of Sam Lantinga
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 0xA7763BE6
do_http_fetch SDL "https://www.libsdl.org/release/SDL-${SDL_VERSION}.tar.gz" 'tar xzf' \
"gpgurl:http://www.libsdl.org/release/SDL-${SDL_VERSION}.tar.gz.sig"
rm -Rf $HOME/.gnupg
./autogen.sh
do_configure \
--enable-video \
--enable-video-gp2x \
--disable-video-x11 \
--disable-video-directfb
do_make
# No man pages
do_make install-bin install-hdrs install-lib install-data
do_clean_bdir
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,161 @@
Index: mpeg2dec-0.5.1/configure.ac
===================================================================
--- mpeg2dec-0.5.1.orig/configure.ac
+++ mpeg2dec-0.5.1/configure.ac
@@ -105,7 +105,7 @@ elif test x"$GCC" = x"yes"; then
AC_LANG(C)
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
- void foo(void) { __asm__ volatile("pld [r1]"); }]])],
+ void foo(void) { __asm__ volatile("@pld [r1]"); }]])],
build_arm_opt=true; AC_DEFINE([ARCH_ARM],,[ARM architecture]),
build_arm_opt=false);;
esac
Index: mpeg2dec-0.5.1/libmpeg2/motion_comp_arm_s.S
===================================================================
--- mpeg2dec-0.5.1.orig/libmpeg2/motion_comp_arm_s.S
+++ mpeg2dec-0.5.1/libmpeg2/motion_comp_arm_s.S
@@ -27,7 +27,7 @@
.internal MC_put_o_16_arm
MC_put_o_16_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
+ @pld [r1]
stmfd sp!, {r4-r11, lr} @ R14 is also called LR
and r4, r1, #3
ldrb r4, [pc, r4]
@@ -41,7 +41,7 @@ MC_put_o_16_arm:
MC_put_o_16_arm_align0:
ldmia r1, {r4-r7}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
stmia r0, {r4-r7}
subs r3, r3, #1
add r0, r0, r2
@@ -52,7 +52,7 @@ MC_put_o_16_arm_align0:
ldmia r1, {r4-r8}
add r1, r1, r2
mov r9, r4, lsr #(\shift)
- pld [r1]
+ @pld [r1]
mov r10, r5, lsr #(\shift)
orr r9, r9, r5, lsl #(32-\shift)
mov r11, r6, lsr #(\shift)
@@ -87,7 +87,7 @@ MC_put_o_16_arm_align3:
.internal MC_put_o_8_arm
MC_put_o_8_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
+ @pld [r1]
stmfd sp!, {r4-r10, lr} @ R14 is also called LR
and r4, r1, #3
ldrb r4, [pc, r4]
@@ -101,7 +101,7 @@ MC_put_o_8_arm:
MC_put_o_8_arm_align0:
ldmia r1, {r4-r5}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
stmia r0, {r4-r5}
add r0, r0, r2
subs r3, r3, #1
@@ -112,7 +112,7 @@ MC_put_o_8_arm_align0:
ldmia r1, {r4-r6}
add r1, r1, r2
mov r9, r4, lsr #(\shift)
- pld [r1]
+ @pld [r1]
mov r10, r5, lsr #(\shift)
orr r9, r9, r5, lsl #(32-\shift)
orr r10, r10, r6, lsl #(32-\shift)
@@ -156,7 +156,7 @@ MC_put_o_8_arm_align3:
.internal MC_put_x_16_arm
MC_put_x_16_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
+ @pld [r1]
stmfd sp!, {r4-r11,lr} @ R14 is also called LR
ldr r11, 0f
and r4, r1, #3
@@ -186,7 +186,7 @@ MC_put_x_16_arm:
MC_put_x_16_arm_align0:
ldmia r1, {r4-r8}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
AVG_PW r7, r8
AVG_PW r6, r7
AVG_PW r5, r6
@@ -200,7 +200,7 @@ MC_put_x_16_arm_align1:
and r1, r1, #0xFFFFFFFC
1: ldmia r1, {r4-r8}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
ADJ_ALIGN_QW 8, r4, r5, r6, r7, r8
AVG_PW r7, r8
AVG_PW r6, r7
@@ -215,7 +215,7 @@ MC_put_x_16_arm_align2:
and r1, r1, #0xFFFFFFFC
1: ldmia r1, {r4-r8}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
ADJ_ALIGN_QW 16, r4, r5, r6, r7, r8
AVG_PW r7, r8
AVG_PW r6, r7
@@ -230,7 +230,7 @@ MC_put_x_16_arm_align3:
and r1, r1, #0xFFFFFFFC
1: ldmia r1, {r4-r8}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
ADJ_ALIGN_QW 24, r4, r5, r6, r7, r8
AVG_PW r7, r8
AVG_PW r6, r7
@@ -248,7 +248,7 @@ MC_put_x_16_arm_align3:
.internal MC_put_x_8_arm
MC_put_x_8_arm:
@@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height)
- pld [r1]
+ @pld [r1]
stmfd sp!, {r4-r11,lr} @ R14 is also called LR
ldr r11, 0f
and r4, r1, #3
@@ -274,7 +274,7 @@ MC_put_x_8_arm:
MC_put_x_8_arm_align0:
ldmia r1, {r4-r6}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
AVG_PW r5, r6
AVG_PW r4, r5
stmia r0, {r5-r6}
@@ -286,7 +286,7 @@ MC_put_x_8_arm_align1:
and r1, r1, #0xFFFFFFFC
1: ldmia r1, {r4-r6}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
ADJ_ALIGN_DW 8, r4, r5, r6
AVG_PW r5, r6
AVG_PW r4, r5
@@ -299,7 +299,7 @@ MC_put_x_8_arm_align2:
and r1, r1, #0xFFFFFFFC
1: ldmia r1, {r4-r6}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
ADJ_ALIGN_DW 16, r4, r5, r6
AVG_PW r5, r6
AVG_PW r4, r5
@@ -312,7 +312,7 @@ MC_put_x_8_arm_align3:
and r1, r1, #0xFFFFFFFC
1: ldmia r1, {r4-r6}
add r1, r1, r2
- pld [r1]
+ @pld [r1]
ADJ_ALIGN_DW 24, r4, r5, r6
AVG_PW r5, r6
AVG_PW r4, r5
+30
View File
@@ -0,0 +1,30 @@
#! /bin/sh
TOOLCHAIN_REVISION=376
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
HELPERS_DIR=$PACKAGE_DIR/../..
. $HELPERS_DIR/functions.sh
# Don't run open2x-gp2x-apps.sh as it hardcodes all paths, and ask for confirmation
# Just do the same
do_make_bdir
do_svn_fetch "open2x-toolchain" 'https://svn.code.sourceforge.net/p/open2x/code/trunk/toolchain-new' "${TOOLCHAIN_REVISION}"
export TARBALLS_DIR="$(pwd)/sources"
# PREFIX is already exported and it matters way more than RESULT_TOP
export RESULT_TOP="${PREFIX}"
export GCC_LANGUAGES="c,c++"
mkdir -p "${RESULT_TOP}"
mkdir -p "${TARBALLS_DIR}"
eval `cat arm-gp2x.dat gcc-4.1.1-glibc-2.3.6-hdrs-gp2x.dat` sh all.sh --notest
# Remove leftover files
rm -f /tmp/cc*
do_clean_bdir
rm -rf ${HOME}/.subversion
@@ -0,0 +1,20 @@
Index: getandpatch.sh
===================================================================
--- a/getandpatch.sh (revision 376)
+++ b/getandpatch.sh (working copy)
@@ -70,13 +70,13 @@
case $1 in
*glibc-200*gz)
- wget --tries=5 -P ${TARBALLS_DIR} -c $1 || wget --tries=5 --passive-ftp -P ${TARBALLS_DIR} -c $1 || \
+ wget --no-hsts --progress=dot --tries=5 -P ${TARBALLS_DIR} -c $1 || wget --no-hsts --progress=dot --tries=5 --passive-ftp -P ${TARBALLS_DIR} -c $1 || \
(cd $TARBALLS_DIR; sh $TOP_DIR/glibc-get.sh $1; )
;;
*)
# Note: if you need to use a proxy, try
# export http_proxy=<proxy_host>:<port>
- wget --tries=5 -P ${TARBALLS_DIR} -c $1 || wget --tries=5 --passive-ftp -P ${TARBALLS_DIR} -c $1
+ wget --no-hsts --progress=dot --tries=5 -P ${TARBALLS_DIR} -c $1 || wget --no-hsts --progress=dot --tries=5 --passive-ftp -P ${TARBALLS_DIR} -c $1
# FIXME: support curl on systems that don't have wget
;;
esac
@@ -0,0 +1,18 @@
Index: patches/gcc-4.1.1/gcc-4.1-fix-xflags.patch
===================================================================
--- a/patches/gcc-4.1.1/gcc-4.1-fix-xflags.patch (nonexistent)
+++ b/patches/gcc-4.1.1/gcc-4.1-fix-xflags.patch (working copy)
@@ -0,0 +1,13 @@
+Index: gcc-4.1.1/gcc/Makefile.in
+===================================================================
+--- gcc-4.1.1.orig/gcc/Makefile.in
++++ gcc-4.1.1/gcc/Makefile.in
+@@ -146,7 +146,7 @@ BOOT_LANGUAGES = c @all_boot_languages@
+ # bootstrap compilations.
+ # XCFLAGS is used for most compilations but not when using the GCC just built.
+ # TCFLAGS is used for compilations with the GCC just built.
+-XCFLAGS =
++XCFLAGS = -fgnu89-inline
+ TCFLAGS =
+ CFLAGS = -g
+ STAGE1_CFLAGS = -g @stage1_cflags@
@@ -0,0 +1,154 @@
Index: patches/glibc-2.3.6/fix-configure.patch
===================================================================
--- a/patches/glibc-2.3.6/fix-configure.patch (nonexistent)
+++ b/patches/glibc-2.3.6/fix-configure.patch (working copy)
@@ -0,0 +1,127 @@
+--- a/configure 2020-04-12 18:58:35.522139192 +0200
++++ b/configure 2020-04-12 19:08:06.649377145 +0200
+@@ -3915,11 +3915,11 @@
+ echo "$as_me:$LINENO: checking version of $AS" >&5
+ echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
+ ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 2.1[3-9]*)
++ 2.1[0-9][0-9]*|2.1[3-9]*|2.[2-9]*|[3-9].*|[1-9][0-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+@@ -3976,11 +3976,11 @@
+ echo "$as_me:$LINENO: checking version of $LD" >&5
+ echo $ECHO_N "checking version of $LD... $ECHO_C" >&6
+ ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 2.1[3-9]*)
++ 2.1[0-9][0-9]*|2.1[3-9]*|2.[2-9]*|[3-9].*|[1-9][0-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+@@ -4091,11 +4091,11 @@
+ echo "$as_me:$LINENO: checking version of $CC" >&5
+ echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+ ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 3.[2-9]* | 4.[0-9]* )
++ 3.[2-9]* | [4-9].[0-9]* | [0-9][0-9].[0-9]* )
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+@@ -4152,11 +4152,11 @@
+ echo "$as_me:$LINENO: checking version of $MAKE" >&5
+ echo $ECHO_N "checking version of $MAKE... $ECHO_C" >&6
+ ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 3.79* | 3.[89]*)
++ [4-9].* | [1-9][0-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+@@ -4275,11 +4275,11 @@
+ echo "$as_me:$LINENO: checking version of $MAKEINFO" >&5
+ echo $ECHO_N "checking version of $MAKEINFO... $ECHO_C" >&6
+ ac_prog_version=`$MAKEINFO --version 2>&1 | sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+- 4.*)
++ [4-9].*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+
+ esac
+ echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+@@ -4333,11 +4333,11 @@
+ ac_verc_fail=yes
+ else
+ # Found it, now check the version.
+ echo "$as_me:$LINENO: checking version of $SED" >&5
+ echo $ECHO_N "checking version of $SED... $ECHO_C" >&6
+- ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed version \([0-9]*\.[0-9.]*\).*$/\1/p'`
++ ac_prog_version=`$SED --version 2>&1 | sed -n 's/^.*GNU sed[^0-9]* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 3.0[2-9]*|3.[1-9]*|[4-9]*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+--- a/configure.in 2005-07-18 03:38:55.000000000 +0200
++++ b/configure.in 2020-04-12 18:56:36.406101385 +0200
+@@ -732,14 +732,16 @@
+ AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in
+
+ # Accept binutils 2.13 or newer.
+ AC_CHECK_PROG_VER(AS, $AS, --version,
+ [GNU assembler.* \([0-9]*\.[0-9.]*\)],
+- [2.1[3-9]*], AS=: critic_missing="$critic_missing as")
++ [2.1[0-9][0-9]*|2.1[3-9]*|2.[2-9]*|[3-9].*|[1-9][0-9]*],
++ AS=: critic_missing="$critic_missing as")
+ AC_CHECK_PROG_VER(LD, $LD, --version,
+ [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
+- [2.1[3-9]*], LD=: critic_missing="$critic_missing ld")
++ [2.1[0-9][0-9]*|2.1[3-9]*|2.[2-9]*|[3-9].*|[1-9][0-9]*],
++ LD=: critic_missing="$critic_missing ld")
+
+ # We need the physical current working directory. We cannot use the
+ # "pwd -P" shell builtin since that's not portable. Instead we try to
+ # find a pwd binary. Note that assigning to the PWD environment
+ # variable might have some interesting side effects, so we don't do
+@@ -754,22 +756,22 @@
+ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
+ [version \([egcygnustpi-]*[0-9.]*\)], [3.[2-9]* | 4.[0-9]* ],
+ critic_missing="$critic_missing gcc")
+ AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
+ [GNU Make[^0-9]*\([0-9][0-9.]*\)],
+- [3.79* | 3.[89]*], critic_missing="$critic_missing make")
++ [[4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make")
+
+ AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
+ [GNU gettext.* \([0-9]*\.[0-9.]*\)],
+ [0.10.3[6-9]* | 0.10.[4-9][0-9]* | 0.1[1-9]* | 0.[2-9][0-9]* | [1-9].*],
+ MSGFMT=: aux_missing="$aux_missing msgfmt")
+ AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
+ [GNU texinfo.* \([0-9][0-9.]*\)],
+- [4.*],
++ [[4-9].*],
+ MAKEINFO=: aux_missing="$aux_missing makeinfo")
+ AC_CHECK_PROG_VER(SED, sed, --version,
+- [GNU sed version \([0-9]*\.[0-9.]*\)],
++ [GNU sed[^0-9]* \([0-9]*\.[0-9.]*\)],
+ [3.0[2-9]*|3.[1-9]*|[4-9]*],
+ SED=: aux_missing="$aux_missing sed")
+
+ AC_CHECK_PROGS(AUTOCONF, autoconf, no)
+ case "x$AUTOCONF" in
Index: patches/glibc-2.3.6/fix-manual-rule.patch
===================================================================
--- a/patches/glibc-2.3.6/fix-manual-rule.patch (nonexistent)
+++ b/patches/glibc-2.3.6/fix-manual-rule.patch (working copy)
@@ -0,0 +1,17 @@
+Index: glibc-2.3.6/manual/Makefile
+===================================================================
+--- glibc-2.3.6.orig/manual/Makefile
++++ glibc-2.3.6/manual/Makefile
+@@ -233,7 +233,11 @@ ifdef objpfx
+ .PHONY: stubs
+ stubs: $(objpfx)stubs
+ endif
+-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
++$(objpfx)stubs ../po/manual.pot:
++ $(make-target-directory)
++ touch $@
++
++$(objpfx)stamp%:
+ $(make-target-directory)
+ touch $@
+
@@ -0,0 +1,54 @@
Index: patches/binutils-2.16.1/fix-gprof-build.patch
===================================================================
--- a/patches/binutils-2.16.1/fix-gprof-build.patch (nonexistent)
+++ b/patches/binutils-2.16.1/fix-gprof-build.patch (working copy)
@@ -0,0 +1,49 @@
+From: Nick Clifton <nickc@redhat.com>
+Date: Tue, 25 Apr 2006 16:20:47 +0000 (+0000)
+Subject: PR 2587
+X-Git-Tag: msnyder-reverse-20060502-branchpoint~43
+X-Git-Url: https://sourceware.org/git/?p=binutils.git;a=commitdiff_plain;h=db8a5ee7993480e2e764a17ec91bd12f49076c0b
+
+PR 2587
+* Makefile.am: Add empty rule for .m -> .o build in order to work around bug
+ in gmake shipped by Apple.
+* Makefile.in: Regenerate.
+---
+
+diff --git a/gprof/Makefile.am b/gprof/Makefile.am
+index 1b8626753..a79912f0d 100644
+--- a/gprof/Makefile.am
++++ b/gprof/Makefile.am
+@@ -39,6 +39,9 @@ EXTRA_DIST = $(BUILT_SOURCES) bbconv.pl $(man_MANS)
+
+ diststuff: $(BUILT_SOURCES) info $(man_MANS)
+
++# This empty rule is a hack against gmake patched by Apple.
++%.o:%.m
++
+ .m.c:
+ awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
+ FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
+diff --git a/gprof/Makefile.in b/gprof/Makefile.in
+index 328a3da48..fcebab1df 100644
+--- a/gprof/Makefile.in
++++ b/gprof/Makefile.in
+@@ -393,7 +393,7 @@ distclean-libtool:
+ else \
+ rc=$$?; \
+ cd $(srcdir) && \
+- $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
++ $$restore $$backupdir/* `echo "$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
+
+@@ -799,6 +799,9 @@ uninstall-man: uninstall-man1
+
+ diststuff: $(BUILT_SOURCES) info $(man_MANS)
+
++# this empry rule is a hack against gmake patched by Apple.
++%.o:%.m
++
+ .m.c:
+ awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
+ FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
@@ -0,0 +1,11 @@
Index: gcc-4.1.1-glibc-2.3.6-hdrs-gp2x.dat
===================================================================
--- a/gcc-4.1.1-glibc-2.3.6-hdrs-gp2x.dat (revision 376)
+++ b/gcc-4.1.1-glibc-2.3.6-hdrs-gp2x.dat (working copy)
@@ -3,5 +3,5 @@
GCC_DIR=gcc-4.1.1
GLIBC_DIR=glibc-2.3.6
LINUX_DIR=linux-2.6.11.2
-LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.11.2
+DO_NOT_USE_LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.11.2
GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.6
+29
View File
@@ -0,0 +1,29 @@
FROM toolchains/open2x AS toolchain
m4_include(`paths.m4')m4_dnl
m4_include(`debian-builder-base.m4')m4_dnl
ENV HOST=arm-open2x-linux PREFIX=/opt/open2x
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bzip2 && \
rm -rf /var/lib/apt/lists/*
COPY --from=toolchain $PREFIX $PREFIX/
# We add PATH here for *-config and platform specific binaries
ENV \
def_binaries(`${PREFIX}/bin/${HOST}-', `ar, as, c++filt, ld, nm, objcopy, objdump, ranlib, readelf, strings, strip') \
def_binaries(`${PREFIX}/bin/${HOST}-', `gcc, cpp, c++') \
CC=${PREFIX}/bin/$HOST-gcc \
def_aclocal(`${PREFIX}') \
def_pkg_config(`${PREFIX}') \
PATH=$PATH:${PREFIX}/bin \
CPPFLAGS="-isystem ${PREFIX}/include -DDISABLE_X11 -DARM -D_ARM_ASSEM_" \
CFLAGS="-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t" \
CXXFLAGS="-O3 -ffast-math -fomit-frame-pointer -mcpu=arm920t" \
LDFLAGS="-L${PREFIX}/lib"
m4_include(`run-buildbot.m4')m4_dnl