mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-08-20 17:34:25 -05:00
Compare commits
80 Commits
devkitA64_
...
v20180606
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
caad8fafae | ||
|
|
49d8b5dc46 | ||
|
|
c021bf4c57 | ||
|
|
ae79a8de3a | ||
|
|
3a3efdafd4 | ||
|
|
ab8de4361a | ||
|
|
26cc59f4f6 | ||
|
|
b8b26124cb | ||
|
|
108127de46 | ||
|
|
a3ae2e737d | ||
|
|
09627572b9 | ||
|
|
5bb8680c27 | ||
|
|
2e9c460a7b | ||
|
|
8092439fb4 | ||
|
|
f14cd29e65 | ||
|
|
582cbfccf0 | ||
|
|
2c5d7c7aa6 | ||
|
|
e5d204e8d7 | ||
|
|
ef4026d7f5 | ||
|
|
3208e8a40f | ||
|
|
2a5ab41670 | ||
|
|
e5bf7206ee | ||
|
|
af5014409c | ||
|
|
0f779b9c71 | ||
|
|
ae4678d8f2 | ||
|
|
082b2bcd23 | ||
|
|
32faa8f8b0 | ||
|
|
342e3027f0 | ||
|
|
9e2e3d8c83 | ||
|
|
5559ee7f10 | ||
|
|
b56e3bcd13 | ||
|
|
3f96ad9f15 | ||
|
|
0ae581030f | ||
|
|
13e6fe4f73 | ||
|
|
7aaf53694a | ||
|
|
c8d25bb1eb | ||
|
|
e50653eda0 | ||
|
|
d69416d0d0 | ||
|
|
f9d48b38cd | ||
|
|
732a0a147c | ||
|
|
ee0c0b0e25 | ||
|
|
ac90deb1b6 | ||
|
|
65c611892d | ||
|
|
53f6f731ba | ||
|
|
fec333d757 | ||
|
|
ecf9b7ff35 | ||
|
|
2a5bce18e5 | ||
|
|
237116fd60 | ||
|
|
9157139c4b | ||
|
|
f5db4fcdab | ||
|
|
d403a37ba3 | ||
|
|
c2bddeeaba | ||
|
|
8d172cbc54 | ||
|
|
4b9b525ece | ||
|
|
6b96e9cd37 | ||
|
|
c8a4625d58 | ||
|
|
79c613e107 | ||
|
|
ec7878a7f4 | ||
|
|
9703aa466d | ||
|
|
a63085cbab | ||
|
|
0e5742cffc | ||
|
|
cacdb68a25 | ||
|
|
c0ad7d6b39 | ||
|
|
c3be8de5fd | ||
|
|
0f5d3ff642 | ||
|
|
34cbee2b35 | ||
|
|
44e7b8a0d0 | ||
|
|
440d1749e4 | ||
|
|
a295eb3768 | ||
|
|
2479a04370 | ||
|
|
bfe7e72e9c | ||
|
|
dd38d1be69 | ||
|
|
dec468b641 | ||
|
|
511c3a1b95 | ||
|
|
caa95f2456 | ||
|
|
e92a6bc61f | ||
|
|
1a07597d9c | ||
|
|
c3c0953fbd | ||
|
|
552eb4380c | ||
|
|
ca17b44dc0 |
11
README.TXT
11
README.TXT
@@ -4,6 +4,11 @@ devkitPro build scripts
|
||||
This readme will guide you through building devkitARM, devkitPPC or devkitA64
|
||||
from source using a set of scripts.
|
||||
|
||||
Please note that we can't guarantee that what you build with these scripts
|
||||
will function in the same way as the binaries we distribute. Where possible
|
||||
you should use the binary distributions. We also offer no support for any
|
||||
problems you may encounter with these scripts.
|
||||
|
||||
The windows versions of the toolchains are now cross compiled on linux using
|
||||
mingw-w64
|
||||
|
||||
@@ -34,7 +39,7 @@ http://www.zlib.net
|
||||
http://www.libusb.org
|
||||
http://expat.sourceforge.net/
|
||||
|
||||
sudo apt-get install libfreeimage-dev zlib1g-dev libusb-dev libexpat1-dev
|
||||
sudo apt-get install libfreeimage-dev zlib1g-dev libusb-dev libudev-dev libexpat1-dev
|
||||
|
||||
|
||||
Building gxtexconv for cube/wii needs GL/gl.h which can be obtained with
|
||||
@@ -45,8 +50,10 @@ Tools for devkitA64 require liblz4.
|
||||
|
||||
http://lz4.github.io/lz4/
|
||||
|
||||
sudo apt-get install liblz4-dev
|
||||
sudo apt-get install liblz4-dev
|
||||
|
||||
The liblz4 with Ubuntu 14.04 isn't new enough. Either upgrade to at least 16.04 or
|
||||
build this from source.
|
||||
|
||||
For building the OSX versions we install the Xcode commandline tools and build
|
||||
pkg-config from source as well as static versions of the libraries listed above.
|
||||
|
||||
108
build-devkit.sh
108
build-devkit.sh
@@ -1,16 +1,15 @@
|
||||
#!/bin/bash
|
||||
#---------------------------------------------------------------------------------
|
||||
# devkitARM release 47
|
||||
# devkitPPC release 29-1
|
||||
# devkitA64 alpha 7
|
||||
# devkitARM release 48
|
||||
# devkitPPC release 30
|
||||
# devkitA64 release 9
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
if [ 0 -eq 1 ] ; then
|
||||
echo "Currently in release cycle, proceed with caution, do not report problems, do not ask for support."
|
||||
if [ 1 -eq 1 ] ; then
|
||||
echo "Please use the latest release buildscripts unless advised otherwise by devkitPro staff."
|
||||
echo "http://sourceforge.net/projects/devkitpro/files/buildscripts/"
|
||||
echo "https://github.com/devkitPro/buildscripts/releases/latest"
|
||||
echo
|
||||
echo "The scripts in the git repository are quite often dependent on things which currently only exist"
|
||||
echo "The scripts in the git repository may be dependent on things which currently only exist"
|
||||
echo "on developer machines. This is not a bug, use stable releases."
|
||||
exit 1
|
||||
fi
|
||||
@@ -19,46 +18,47 @@ echo "Please note, these scripts are provided as a courtesy, toolchains built wi
|
||||
echo "are for personal use only and may not be distributed by entities other than devkitPro."
|
||||
echo "See http://devkitpro.org/wiki/Trademarks"
|
||||
echo
|
||||
echo "Patches and improvements are of course welcome, please send these to the patch tracker"
|
||||
echo "https://sourceforge.net/tracker/?group_id=114505&atid=668553"
|
||||
echo "Patches and improvements are of course welcome, please submit a PR"
|
||||
echo "https://github.com/devkitPro/buildscripts/pulls"
|
||||
echo
|
||||
|
||||
|
||||
GENERAL_TOOLS_VER=1.0.1
|
||||
GENERAL_TOOLS_VER=1.0.2
|
||||
|
||||
LIBGBA_VER=0.5.0
|
||||
GBATOOLS_VER=1.0.0
|
||||
LIBGBA_VER=0.5.1
|
||||
GBATOOLS_VER=1.1.0
|
||||
|
||||
LIBNDS_VER=1.6.2
|
||||
DEFAULT_ARM7_VER=0.7.0
|
||||
DSWIFI_VER=0.4.1
|
||||
LIBNDS_VER=1.7.2
|
||||
DEFAULT_ARM7_VER=0.7.4
|
||||
DSWIFI_VER=0.4.2
|
||||
MAXMOD_VER=1.0.11
|
||||
FILESYSTEM_VER=0.9.13
|
||||
LIBFAT_VER=1.1.0
|
||||
DSTOOLS_VER=1.1.0
|
||||
GRIT_VER=0.8.14
|
||||
NDSTOOL_VER=2.0.3
|
||||
DLDITOOL_VER=1.24.0
|
||||
MMUTIL_VER=1.8.6
|
||||
FILESYSTEM_VER=0.9.14
|
||||
LIBFAT_VER=1.1.3
|
||||
DSTOOLS_VER=1.2.1
|
||||
GRIT_VER=0.8.15
|
||||
NDSTOOL_VER=2.1.1
|
||||
MMUTIL_VER=1.8.7
|
||||
|
||||
DFU_UTIL_VER=0.9.1
|
||||
STLINK_VER=1.2.3
|
||||
|
||||
GAMECUBE_TOOLS_VER=1.0.1
|
||||
LIBOGC_VER=1.8.16
|
||||
GAMECUBE_TOOLS_VER=1.0.2
|
||||
LIBOGC_VER=1.8.17
|
||||
WIILOAD_VER=0.5.1
|
||||
|
||||
LIBCTRU_VER=1.3.0
|
||||
CITRO3D_VER=1.3.0
|
||||
LIBCTRU_VER=1.5.0
|
||||
CITRO3D_VER=1.4.0
|
||||
CITRO2D_VER=1.0.0
|
||||
TOOLS3DS_VER=1.1.4
|
||||
LINK3DS_VER=0.5.2
|
||||
PICASSO_VER=2.6.2
|
||||
PICASSO_VER=2.7.0
|
||||
TEX3DS_VER=1.0.0
|
||||
|
||||
GP32_TOOLS_VER=1.0.3
|
||||
LIBMIRKO_VER=0.9.7
|
||||
LIBMIRKO_VER=0.9.8
|
||||
|
||||
SWITCH_TOOLS_VER=1.1.1
|
||||
LIBNX_VER=1.0.0
|
||||
SWITCH_TOOLS_VER=1.4.0
|
||||
LIBNX_VER=1.2.1
|
||||
|
||||
OSXMIN=${OSXMIN:-10.9}
|
||||
|
||||
@@ -153,8 +153,11 @@ export PATH=$PATH:$TOOLPATH/$package/bin
|
||||
|
||||
if [ ! -z $CROSSBUILD ]; then
|
||||
prefix=$INSTALLDIR/$CROSSBUILD/$package
|
||||
toolsprefix=$INSTALLDIR/$CROSSBUILD/tools
|
||||
CROSS_PARAMS="--build=`./config.guess` --host=$CROSSBUILD"
|
||||
CROSS_GCC_PARAMS="--with-gmp=$CROSSPATH --with-mpfr=$CROSSPATH --with-mpc=$CROSSPATH"
|
||||
else
|
||||
toolsprefix=$INSTALLDIR/tools
|
||||
prefix=$INSTALLDIR/$package
|
||||
fi
|
||||
|
||||
@@ -184,8 +187,6 @@ case $PLATFORM in
|
||||
;;
|
||||
MINGW32* )
|
||||
cflags="-D__USE_MINGW_ACCESS"
|
||||
# horrid hack to get -flto to work on windows
|
||||
plugin_ld="--with-plugin-ld=ld"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -200,20 +201,21 @@ fi
|
||||
patchdir=$(pwd)/$basedir/patches
|
||||
scriptdir=$(pwd)/$basedir/scripts
|
||||
|
||||
archives="binutils-${BINUTILS_VER}.tar.bz2 gcc-${GCC_VER}.tar.bz2 newlib-${NEWLIB_VER}.tar.gz gdb-${GDB_VER}.tar.xz"
|
||||
archives="binutils-${BINUTILS_VER}.tar.bz2 gcc-${GCC_VER}.tar.xz newlib-${NEWLIB_VER}.tar.gz gdb-${GDB_VER}.tar.xz"
|
||||
|
||||
if [ $VERSION -eq 1 ]; then
|
||||
|
||||
targetarchives="libnds-src-${LIBNDS_VER}.tar.bz2 libgba-src-${LIBGBA_VER}.tar.bz2
|
||||
libmirko-src-${LIBMIRKO_VER}.tar.bz2 dswifi-src-${DSWIFI_VER}.tar.bz2 maxmod-src-${MAXMOD_VER}.tar.bz2
|
||||
default_arm7-src-${DEFAULT_ARM7_VER}.tar.bz2 libfilesystem-src-${FILESYSTEM_VER}.tar.bz2
|
||||
libfat-src-${LIBFAT_VER}.tar.bz2 libctru-src-${LIBCTRU_VER}.tar.bz2 citro3d-src-${CITRO3D_VER}.tar.bz2"
|
||||
default-arm7-src-${DEFAULT_ARM7_VER}.tar.bz2 libfilesystem-src-${FILESYSTEM_VER}.tar.bz2
|
||||
libfat-src-${LIBFAT_VER}.tar.bz2 libctru-src-${LIBCTRU_VER}.tar.bz2 citro3d-src-${CITRO3D_VER}.tar.bz2
|
||||
citro2d-src-${CITRO2D_VER}.tar.bz2"
|
||||
|
||||
hostarchives="gbatools-$GBATOOLS_VER.tar.bz2 gp32tools-$GP32_TOOLS_VER.tar.bz2
|
||||
hostarchives="gba-tools-$GBATOOLS_VER.tar.bz2 gp32-tools-$GP32_TOOLS_VER.tar.bz2
|
||||
dstools-$DSTOOLS_VER.tar.bz2 grit-$GRIT_VER.tar.bz2 ndstool-$NDSTOOL_VER.tar.bz2
|
||||
general-tools-$GENERAL_TOOLS_VER.tar.bz2 dlditool-$DLDITOOL_VER.tar.bz2 mmutil-$MMUTIL_VER.tar.bz2
|
||||
general-tools-$GENERAL_TOOLS_VER.tar.bz2 mmutil-$MMUTIL_VER.tar.bz2
|
||||
dfu-util-$DFU_UTIL_VER.tar.bz2 stlink-$STLINK_VER.tar.bz2 3dstools-$TOOLS3DS_VER.tar.bz2
|
||||
picasso-$PICASSO_VER.tar.bz2 3dslink-$LINK3DS_VER.tar.bz2"
|
||||
picasso-$PICASSO_VER.tar.bz2 tex3ds-$TEX3DS_VER.tar.bz2 3dslink-$LINK3DS_VER.tar.bz2"
|
||||
fi
|
||||
|
||||
if [ $VERSION -eq 2 ]; then
|
||||
@@ -227,6 +229,8 @@ fi
|
||||
|
||||
if [ $VERSION -eq 3 ]; then
|
||||
|
||||
targetarchives=" libnx-src-${LIBNX_VER}.tar.bz2"
|
||||
|
||||
hostarchives="general-tools-$GENERAL_TOOLS_VER.tar.bz2 switch-tools-$SWITCH_TOOLS_VER.tar.bz2"
|
||||
|
||||
fi
|
||||
@@ -243,7 +247,7 @@ for archive in $archives $targetarchives $hostarchives
|
||||
do
|
||||
echo $archive
|
||||
if [ ! -f $archive ]; then
|
||||
$FETCH https://github.com/devkitPro/buildscripts/releases/download/sources/$archive || { echo "Error: Failed to download $archive"; exit 1; }
|
||||
$FETCH https://downloads.devkitpro.org/$archive || { echo "Error: Failed to download $archive"; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -252,7 +256,7 @@ mkdir -p $BUILDDIR
|
||||
cd $BUILDDIR
|
||||
|
||||
extract_and_patch binutils $BINUTILS_VER bz2
|
||||
extract_and_patch gcc $GCC_VER bz2
|
||||
extract_and_patch gcc $GCC_VER xz
|
||||
extract_and_patch newlib $NEWLIB_VER gz
|
||||
extract_and_patch gdb $GDB_VER xz
|
||||
|
||||
@@ -282,11 +286,17 @@ done
|
||||
# Build and install devkit components
|
||||
#---------------------------------------------------------------------------------
|
||||
if [ -f $scriptdir/build-gcc.sh ]; then . $scriptdir/build-gcc.sh || { echo "Error building toolchain"; exit 1; }; cd $BUILDSCRIPTDIR; fi
|
||||
if [ -f $scriptdir/build-tools.sh ]; then . $scriptdir/build-tools.sh || { echo "Error building tools"; exit 1; }; cd $BUILDSCRIPTDIR; fi
|
||||
if [ -f $scriptdir/build-crtls.sh ]; then . $scriptdir/build-crtls.sh || { echo "Error building crtls"; exit 1; }; cd $BUILDSCRIPTDIR; fi
|
||||
|
||||
if [ ! -z $CROSSBUILD ]; then
|
||||
cp -v $CROSSBINPATH/*.dll $CROSSLIBPATH/*.dll $prefix/bin
|
||||
if [ "$BUILD_DKPRO_SKIP_TOOLS" != "1" ] && [ -f $scriptdir/build-tools.sh ]; then
|
||||
. $scriptdir/build-tools.sh || { echo "Error building tools"; exit 1; }; cd $BUILDSCRIPTDIR;
|
||||
fi
|
||||
|
||||
if [ "$BUILD_DKPRO_SKIP_LIBRARIES" != "1" ] && [ -f $scriptdir/build-libs.sh ]; then
|
||||
. $scriptdir/build-libs.sh || { echo "Error building libraries"; exit 1; }; cd $BUILDSCRIPTDIR;
|
||||
fi
|
||||
|
||||
if [ ! -z $CROSSBUILD ] && grep -q "mingw" <<<"$CROSSBUILD" ; then
|
||||
cp -v $CROSSBINPATH//libwinpthread-1.dll $prefix/bin
|
||||
fi
|
||||
|
||||
echo "stripping installed binaries"
|
||||
@@ -314,5 +324,13 @@ fi
|
||||
|
||||
|
||||
echo
|
||||
echo "note: Add the following to your environment; DEVKITPRO=$TOOLPATH $toolchain=$TOOLPATH/$package"
|
||||
echo "note: Add the following to your environment;"
|
||||
echo
|
||||
echo " DEVKITPRO=$TOOLPATH"
|
||||
if [ "$toolchain" != "DEVKITA64" ]; then
|
||||
echo " $toolchain=$TOOLPATH/$package"
|
||||
fi
|
||||
echo
|
||||
echo "add $TOOLPATH/tools/bin to your PATH"
|
||||
echo
|
||||
echo
|
||||
|
||||
@@ -24,13 +24,30 @@ BUILD_DKPRO_PACKAGE=0
|
||||
#---------------------------------------------------------------------------------
|
||||
#BUILD_DKPRO_SRCDIR=~/projects/archives
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# skip building the target libraries
|
||||
#---------------------------------------------------------------------------------
|
||||
BUILD_DKPRO_SKIP_LIBRARIES=0
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# MAKEFLAGS for building - use number of processors for jobs
|
||||
#---------------------------------------------------------------------------------
|
||||
#numcores=`getconf _NPROCESSORS_ONLN`
|
||||
#export MAKEFLAGS="$MAKEFLAGS -j${numcores}"
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Uncomment to skip building of tools
|
||||
#---------------------------------------------------------------------------------
|
||||
#BUILD_DKPRO_SKIP_TOOLS=1
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Uncomment to skip building of libraries
|
||||
#---------------------------------------------------------------------------------
|
||||
#BUILD_DKPRO_SKIP_LIBRARIES=1
|
||||
|
||||
|
||||
# Automated script execution
|
||||
#---------------------------------------------------------------------------------
|
||||
# 0: Ask to delete build folders & patched sources
|
||||
|
||||
@@ -3,5 +3,3 @@ export CROSSBUILD=i686-w64-mingw32
|
||||
export CROSSLIBPATH=/opt/mingw32/mingw/lib
|
||||
export CROSSBINPATH=/opt/mingw32/mingw/bin
|
||||
export PATH=/opt/mingw32/bin:$PATH
|
||||
export PKG_CONFIG_PATH=
|
||||
export PKG_CONFIG_LIBDIR=$CROSSLIBPATH/pkgconfig
|
||||
|
||||
18
cross-build-x86_64-apple-darwin15.sh
Executable file
18
cross-build-x86_64-apple-darwin15.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
export CPPFLAGS=-I/opt/osx/x86_64-apple-darwin15/include
|
||||
export LDFLAGS=-L/opt/osx/x86_64-apple-darwin15/lib
|
||||
|
||||
export OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
|
||||
|
||||
export CC=x86_64-apple-darwin15-clang
|
||||
export CXX=x86_64-apple-darwin15-clang++
|
||||
|
||||
export CROSSBUILD=x86_64-apple-darwin15
|
||||
export CROSSPATH=/opt/osx/x86_64-apple-darwin15
|
||||
export CROSSLIBPATH=$CROSSPATH/lib
|
||||
export CROSSBINPATH=$CROSSPATH/bin
|
||||
export PATH=/opt/osx/bin:$PATH
|
||||
export PKG_CONFIG_PATH=
|
||||
export PKG_CONFIG_LIBDIR=$CROSSLIBPATH/pkgconfig
|
||||
|
||||
@@ -4,6 +4,4 @@ export CROSSPATH=/opt/mingw64/mingw
|
||||
export CROSSLIBPATH=$CROSSPATH/lib
|
||||
export CROSSBINPATH=$CROSSPATH/bin
|
||||
export PATH=/opt/mingw64/bin:$PATH
|
||||
export PKG_CONFIG_PATH=
|
||||
export PKG_CONFIG_LIBDIR=$CROSSLIBPATH/pkgconfig
|
||||
|
||||
|
||||
@@ -1,342 +0,0 @@
|
||||
diff -Nbaur binutils-2.29.1-orig/bfd/elfnn-aarch64.c binutils-2.29.1-dka64/bfd/elfnn-aarch64.c
|
||||
--- binutils-2.29.1-orig/bfd/elfnn-aarch64.c 2017-09-05 14:12:46.000000000 +0100
|
||||
+++ binutils-2.29.1-dka64/bfd/elfnn-aarch64.c 2017-10-22 06:58:57.711591457 +0100
|
||||
@@ -2097,6 +2097,12 @@
|
||||
aarch64_stub_erratum_843419_veneer,
|
||||
};
|
||||
|
||||
+/* Is an undefined weak symbol resolved to 0 ? */
|
||||
+#define UNDEFINED_WEAK_RESOLVED_TO_ZERO(INFO, EH) \
|
||||
+ ((EH)->root.root.type == bfd_link_hash_undefweak \
|
||||
+ && bfd_link_executable (INFO) \
|
||||
+ && !(INFO)->dynamic_undefined_weak)
|
||||
+
|
||||
struct elf_aarch64_stub_hash_entry
|
||||
{
|
||||
/* Base hash table entry structure. */
|
||||
@@ -6081,11 +6087,13 @@
|
||||
Elf_Internal_Sym *sym;
|
||||
asection *sec;
|
||||
struct elf_link_hash_entry *h;
|
||||
+ struct elf_aarch64_link_hash_entry *eh;
|
||||
bfd_vma relocation;
|
||||
bfd_reloc_status_type r;
|
||||
arelent bfd_reloc;
|
||||
char sym_type;
|
||||
bfd_boolean unresolved_reloc = FALSE;
|
||||
+ bfd_boolean resolved_to_zero = FALSE;
|
||||
char *error_message = NULL;
|
||||
|
||||
r_symndx = ELFNN_R_SYM (rel->r_info);
|
||||
@@ -6225,6 +6233,10 @@
|
||||
h, &unresolved_reloc,
|
||||
save_addend, &addend, sym);
|
||||
|
||||
+ eh = (struct elf_aarch64_link_hash_entry *) h;
|
||||
+ resolved_to_zero = (eh != NULL
|
||||
+ && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh));
|
||||
+
|
||||
switch (elfNN_aarch64_bfd_reloc_from_type (r_type))
|
||||
{
|
||||
case BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC:
|
||||
@@ -6248,7 +6260,7 @@
|
||||
need_relocs =
|
||||
(bfd_link_pic (info) || indx != 0) &&
|
||||
(h == NULL
|
||||
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|
||||
|| h->root.type != bfd_link_hash_undefweak);
|
||||
|
||||
BFD_ASSERT (globals->root.srelgot != NULL);
|
||||
@@ -6343,7 +6355,7 @@
|
||||
need_relocs =
|
||||
(bfd_link_pic (info) || indx != 0) &&
|
||||
(h == NULL
|
||||
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|
||||
|| h->root.type != bfd_link_hash_undefweak);
|
||||
|
||||
BFD_ASSERT (globals->root.srelgot != NULL);
|
||||
@@ -6392,7 +6404,7 @@
|
||||
bfd_vma off = symbol_tlsdesc_got_offset (input_bfd, h, r_symndx);
|
||||
|
||||
need_relocs = (h == NULL
|
||||
- || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
+ || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|
||||
|| h->root.type != bfd_link_hash_undefweak);
|
||||
|
||||
BFD_ASSERT (globals->root.srelgot != NULL);
|
||||
@@ -6891,6 +6903,26 @@
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+/* Remove undefined weak symbol from the dynamic symbol table if it
|
||||
+ is resolved to 0. */
|
||||
+
|
||||
+extern bfd_boolean
|
||||
+elfNN_aarch64_elf_fixup_symbol (struct bfd_link_info *, struct elf_link_hash_entry *);
|
||||
+
|
||||
+bfd_boolean
|
||||
+elfNN_aarch64_elf_fixup_symbol (struct bfd_link_info *info,
|
||||
+ struct elf_link_hash_entry *h)
|
||||
+{
|
||||
+ if (h->dynindx != -1
|
||||
+ && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, elf_aarch64_hash_entry (h)))
|
||||
+ {
|
||||
+ h->dynindx = -1;
|
||||
+ _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
|
||||
+ h->dynstr_index);
|
||||
+ }
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
/* Adjust a symbol defined by a dynamic object and referenced by a
|
||||
regular object. The current definition is in some section of the
|
||||
dynamic object, but we're not including those sections. We have to
|
||||
@@ -8068,6 +8100,7 @@
|
||||
struct elf_aarch64_link_hash_table *htab;
|
||||
struct elf_aarch64_link_hash_entry *eh;
|
||||
struct elf_dyn_relocs *p;
|
||||
+ bfd_boolean resolved_to_zero;
|
||||
|
||||
/* An example of a bfd_link_hash_indirect symbol is versioned
|
||||
symbol. For example: __gxx_personality_v0(bfd_link_hash_indirect)
|
||||
@@ -8087,6 +8120,10 @@
|
||||
info = (struct bfd_link_info *) inf;
|
||||
htab = elf_aarch64_hash_table (info);
|
||||
|
||||
+ eh = (struct elf_aarch64_link_hash_entry *) h;
|
||||
+ eh->tlsdesc_got_jump_table_offset = (bfd_vma) - 1;
|
||||
+ resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
|
||||
+
|
||||
/* Since STT_GNU_IFUNC symbol must go through PLT, we handle it
|
||||
here if it is defined and referenced in a non-shared object. */
|
||||
if (h->type == STT_GNU_IFUNC
|
||||
@@ -8096,7 +8133,7 @@
|
||||
{
|
||||
/* Make sure this symbol is output as a dynamic symbol.
|
||||
Undefined weak syms won't yet be marked as dynamic. */
|
||||
- if (h->dynindx == -1 && !h->forced_local
|
||||
+ if (h->dynindx == -1 && !h->forced_local && !resolved_to_zero
|
||||
&& h->root.type == bfd_link_hash_undefweak)
|
||||
{
|
||||
if (!bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
@@ -8130,6 +8167,11 @@
|
||||
of relaxing into these from the large model PLT entries. */
|
||||
s->size += PLT_SMALL_ENTRY_SIZE;
|
||||
|
||||
+ /* There should be no PLT relocations against resolved undefined
|
||||
+ weak symbols in the executable. */
|
||||
+ if (!resolved_to_zero)
|
||||
+ {
|
||||
+
|
||||
/* We also need to make an entry in the .got.plt section, which
|
||||
will be placed in the .got section by the linker script. */
|
||||
htab->root.sgotplt->size += GOT_ENTRY_SIZE;
|
||||
@@ -8152,6 +8194,7 @@
|
||||
|
||||
htab->root.srelplt->reloc_count++;
|
||||
}
|
||||
+ }
|
||||
else
|
||||
{
|
||||
h->plt.offset = (bfd_vma) - 1;
|
||||
@@ -8164,9 +8207,6 @@
|
||||
h->needs_plt = 0;
|
||||
}
|
||||
|
||||
- eh = (struct elf_aarch64_link_hash_entry *) h;
|
||||
- eh->tlsdesc_got_jump_table_offset = (bfd_vma) - 1;
|
||||
-
|
||||
if (h->got.refcount > 0)
|
||||
{
|
||||
bfd_boolean dyn;
|
||||
@@ -8178,7 +8218,7 @@
|
||||
|
||||
/* Make sure this symbol is output as a dynamic symbol.
|
||||
Undefined weak syms won't yet be marked as dynamic. */
|
||||
- if (dyn && h->dynindx == -1 && !h->forced_local
|
||||
+ if (dyn && h->dynindx == -1 && !h->forced_local && !resolved_to_zero
|
||||
&& h->root.type == bfd_link_hash_undefweak)
|
||||
{
|
||||
if (!bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
@@ -8192,7 +8232,7 @@
|
||||
{
|
||||
h->got.offset = htab->root.sgot->size;
|
||||
htab->root.sgot->size += GOT_ENTRY_SIZE;
|
||||
- if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
+ if (((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|
||||
|| h->root.type != bfd_link_hash_undefweak)
|
||||
&& (bfd_link_pic (info)
|
||||
|| WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
|
||||
@@ -8225,7 +8265,7 @@
|
||||
}
|
||||
|
||||
indx = h && h->dynindx != -1 ? h->dynindx : 0;
|
||||
- if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|
||||
+ if (((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero)
|
||||
|| h->root.type != bfd_link_hash_undefweak)
|
||||
&& (bfd_link_pic (info)
|
||||
|| indx != 0
|
||||
@@ -8291,7 +8331,7 @@
|
||||
visibility. */
|
||||
if (eh->dyn_relocs != NULL && h->root.type == bfd_link_hash_undefweak)
|
||||
{
|
||||
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
|
||||
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT || resolved_to_zero)
|
||||
eh->dyn_relocs = NULL;
|
||||
|
||||
/* Make sure undefined weak symbols are output as a dynamic
|
||||
@@ -8310,7 +8350,9 @@
|
||||
symbols which turn out to need copy relocs or are not
|
||||
dynamic. */
|
||||
|
||||
- if (!h->non_got_ref
|
||||
+ if (!(h->non_got_ref
|
||||
+ || (h->root.type == bfd_link_hash_undefweak
|
||||
+ && !resolved_to_zero))
|
||||
&& ((h->def_dynamic
|
||||
&& !h->def_regular)
|
||||
|| (htab->root.dynamic_sections_created
|
||||
@@ -8321,6 +8363,7 @@
|
||||
Undefined weak syms won't yet be marked as dynamic. */
|
||||
if (h->dynindx == -1
|
||||
&& !h->forced_local
|
||||
+ && !resolved_to_zero
|
||||
&& h->root.type == bfd_link_hash_undefweak
|
||||
&& !bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return FALSE;
|
||||
@@ -8940,8 +8983,17 @@
|
||||
Elf_Internal_Sym *sym)
|
||||
{
|
||||
struct elf_aarch64_link_hash_table *htab;
|
||||
+ struct elf_aarch64_link_hash_entry *eh;
|
||||
+ bfd_boolean local_undefweak;
|
||||
htab = elf_aarch64_hash_table (info);
|
||||
|
||||
+ eh = (struct elf_aarch64_link_hash_entry *) h;
|
||||
+
|
||||
+ /* We keep PLT/GOT entries without dynamic PLT/GOT relocations for
|
||||
+ resolved undefined weak symbols in executable so that their
|
||||
+ references have value 0 at run-time. */
|
||||
+ local_undefweak = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
|
||||
+
|
||||
if (h->plt.offset != (bfd_vma) - 1)
|
||||
{
|
||||
asection *plt, *gotplt, *relplt;
|
||||
@@ -8976,7 +9028,7 @@
|
||||
return FALSE;
|
||||
|
||||
elfNN_aarch64_create_small_pltn_entry (h, htab, output_bfd, info);
|
||||
- if (!h->def_regular)
|
||||
+ if (!local_undefweak && !h->def_regular)
|
||||
{
|
||||
/* Mark the symbol as undefined, rather than as defined in
|
||||
the .plt section. */
|
||||
@@ -8995,7 +9047,8 @@
|
||||
}
|
||||
|
||||
if (h->got.offset != (bfd_vma) - 1
|
||||
- && elf_aarch64_hash_entry (h)->got_type == GOT_NORMAL)
|
||||
+ && elf_aarch64_hash_entry (h)->got_type == GOT_NORMAL
|
||||
+ && !local_undefweak)
|
||||
{
|
||||
Elf_Internal_Rela rela;
|
||||
bfd_byte *loc;
|
||||
@@ -9489,6 +9542,9 @@
|
||||
#define elf_backend_init_index_section \
|
||||
_bfd_elf_init_2_index_sections
|
||||
|
||||
+#define elf_backend_fixup_symbol \
|
||||
+ elfNN_aarch64_elf_fixup_symbol
|
||||
+
|
||||
#define elf_backend_finish_dynamic_sections \
|
||||
elfNN_aarch64_finish_dynamic_sections
|
||||
|
||||
diff -Nbaur binutils-2.29.1-orig/ld/emulparams/aarch64elf32.sh binutils-2.29.1-dka64/ld/emulparams/aarch64elf32.sh
|
||||
--- binutils-2.29.1-orig/ld/emulparams/aarch64elf32.sh 2017-07-10 10:54:42.000000000 +0100
|
||||
+++ binutils-2.29.1-dka64/ld/emulparams/aarch64elf32.sh 2017-10-22 06:58:57.719591510 +0100
|
||||
@@ -1,3 +1,5 @@
|
||||
+. ${srcdir}/emulparams/dynamic_undefined_weak.sh
|
||||
+
|
||||
ARCH="aarch64:ilp32"
|
||||
MACHINE=
|
||||
NOP=0
|
||||
diff -Nbaur binutils-2.29.1-orig/ld/emulparams/aarch64elf.sh binutils-2.29.1-dka64/ld/emulparams/aarch64elf.sh
|
||||
--- binutils-2.29.1-orig/ld/emulparams/aarch64elf.sh 2017-07-10 10:54:42.000000000 +0100
|
||||
+++ binutils-2.29.1-dka64/ld/emulparams/aarch64elf.sh 2017-10-22 06:58:57.719591510 +0100
|
||||
@@ -1,3 +1,5 @@
|
||||
+. ${srcdir}/emulparams/dynamic_undefined_weak.sh
|
||||
+
|
||||
ARCH=aarch64
|
||||
MACHINE=
|
||||
NOP=0
|
||||
diff -Nbaur binutils-2.29.1-orig/ld/emultempl/aarch64elf.em binutils-2.29.1-dka64/ld/emultempl/aarch64elf.em
|
||||
--- binutils-2.29.1-orig/ld/emultempl/aarch64elf.em 2017-07-10 10:54:42.000000000 +0100
|
||||
+++ binutils-2.29.1-dka64/ld/emultempl/aarch64elf.em 2017-10-22 06:58:57.719591510 +0100
|
||||
@@ -375,7 +375,7 @@
|
||||
{ "no-apply-dynamic-relocs", no_argument, NULL, OPTION_NO_APPLY_DYNAMIC_RELOCS},
|
||||
'
|
||||
|
||||
-PARSE_AND_LIST_OPTIONS='
|
||||
+PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
|
||||
fprintf (file, _(" --no-enum-size-warning Don'\''t warn about objects with incompatible\n"
|
||||
" enum sizes\n"));
|
||||
fprintf (file, _(" --no-wchar-size-warning Don'\''t warn about objects with incompatible"
|
||||
diff -Nbaur binutils-2.29.1-orig/ld/Makefile.am binutils-2.29.1-dka64/ld/Makefile.am
|
||||
--- binutils-2.29.1-orig/ld/Makefile.am 2017-07-10 10:54:42.000000000 +0100
|
||||
+++ binutils-2.29.1-dka64/ld/Makefile.am 2017-10-22 06:58:57.719591510 +0100
|
||||
@@ -1654,19 +1654,23 @@
|
||||
$(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64elf.c: $(srcdir)/emulparams/aarch64elf.sh \
|
||||
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64elf32.c: $(srcdir)/emulparams/aarch64elf32.sh \
|
||||
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64elfb.c: $(srcdir)/emulparams/aarch64elfb.sh $(srcdir)/emulparams/aarch64elf.sh \
|
||||
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aarch64elf32.sh \
|
||||
- $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
+ $(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em ldemul-list.h \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \
|
||||
diff -Nbaur binutils-2.29.1-orig/ld/Makefile.in binutils-2.29.1-dka64/ld/Makefile.in
|
||||
--- binutils-2.29.1-orig/ld/Makefile.in 2017-09-15 12:38:08.000000000 +0100
|
||||
+++ binutils-2.29.1-dka64/ld/Makefile.in 2017-10-22 06:58:57.719591510 +0100
|
||||
@@ -3219,18 +3219,22 @@
|
||||
|
||||
eaarch64elf.c: $(srcdir)/emulparams/aarch64elf.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64elf32.c: $(srcdir)/emulparams/aarch64elf32.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64elfb.c: $(srcdir)/emulparams/aarch64elfb.sh $(srcdir)/emulparams/aarch64elf.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64elf32b.c: $(srcdir)/emulparams/aarch64elf32b.sh $(srcdir)/emulparams/aarch64elf32.sh \
|
||||
$(ELF_DEPS) $(srcdir)/emultempl/aarch64elf.em \
|
||||
+ $(srcdir)/emulparams/dynamic_undefined_weak.sh \
|
||||
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eaarch64cloudabi.c: $(srcdir)/emulparams/aarch64cloudabi.sh \
|
||||
@@ -1,7 +1,7 @@
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.c gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.c
|
||||
--- gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.c 2017-11-03 15:01:10.970890000 +0000
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.c 2018-01-22 20:15:07.232099998 +0000
|
||||
@@ -10009,8 +10009,24 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/config/aarch64/aarch64.c gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.c
|
||||
--- gcc-8.1.0/gcc/config/aarch64/aarch64.c 2018-03-15 08:55:04.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.c 2018-05-08 11:09:01.247467815 +0100
|
||||
@@ -11963,8 +11963,24 @@
|
||||
|| !register_operand (target, Pmode))
|
||||
target = gen_reg_rtx (Pmode);
|
||||
|
||||
@@ -28,9 +28,9 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.c gcc-7.3.0-RC-2018
|
||||
return target;
|
||||
}
|
||||
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64-elf-raw.h gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64-elf-raw.h
|
||||
--- gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64-elf-raw.h 2017-01-01 12:07:43.905435000 +0000
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64-elf-raw.h 2018-01-22 20:15:07.232099998 +0000
|
||||
diff -NBaur gcc-8.1.0/gcc/config/aarch64/aarch64-elf-raw.h gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64-elf-raw.h
|
||||
--- gcc-8.1.0/gcc/config/aarch64/aarch64-elf-raw.h 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64-elf-raw.h 2018-05-08 11:09:01.247467815 +0100
|
||||
@@ -22,6 +22,7 @@
|
||||
#ifndef GCC_AARCH64_ELF_RAW_H
|
||||
#define GCC_AARCH64_ELF_RAW_H
|
||||
@@ -39,10 +39,10 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64-elf-raw.h gcc-7.3.0
|
||||
#define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
|
||||
#define ENDFILE_SPEC \
|
||||
" crtend%O%s crtn%O%s " \
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.h gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.h
|
||||
--- gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.h 2017-09-21 13:16:31.171118000 +0100
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.h 2018-01-22 20:15:07.232099998 +0000
|
||||
@@ -887,6 +887,10 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/config/aarch64/aarch64.h gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.h
|
||||
--- gcc-8.1.0/gcc/config/aarch64/aarch64.h 2018-02-21 14:05:45.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.h 2018-05-08 11:09:01.255467862 +0100
|
||||
@@ -957,6 +957,10 @@
|
||||
/* Check TLS Descriptors mechanism is selected. */
|
||||
#define TARGET_TLS_DESC (aarch64_tls_dialect == TLS_DESCRIPTORS)
|
||||
|
||||
@@ -53,10 +53,10 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.h gcc-7.3.0-RC-2018
|
||||
extern enum aarch64_code_model aarch64_cmodel;
|
||||
|
||||
/* When using the tiny addressing model conditional and unconditional branches
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.md gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.md
|
||||
--- gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.md 2017-04-05 12:48:02.927619000 +0100
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.md 2018-01-22 20:15:07.236099934 +0000
|
||||
@@ -5230,11 +5230,22 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/config/aarch64/aarch64.md gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.md
|
||||
--- gcc-8.1.0/gcc/config/aarch64/aarch64.md 2018-04-24 17:58:49.000000000 +0100
|
||||
+++ gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.md 2018-05-08 11:09:01.255467862 +0100
|
||||
@@ -5693,11 +5693,22 @@
|
||||
(define_insn "aarch64_load_tp_hard"
|
||||
[(set (match_operand:DI 0 "register_operand" "=r")
|
||||
(unspec:DI [(const_int 0)] UNSPEC_TLS))]
|
||||
@@ -81,9 +81,9 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.md gcc-7.3.0-RC-201
|
||||
;; The TLS ABI specifically requires that the compiler does not schedule
|
||||
;; instructions in the TLS stubs, in order to enable linker relaxation.
|
||||
;; Therefore we treat the stubs as an atomic sequence.
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.opt gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.opt
|
||||
--- gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.opt 2017-03-17 17:05:23.131899000 +0000
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64.opt 2018-01-22 20:15:07.236099934 +0000
|
||||
diff -NBaur gcc-8.1.0/gcc/config/aarch64/aarch64.opt gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.opt
|
||||
--- gcc-8.1.0/gcc/config/aarch64/aarch64.opt 2018-01-13 17:50:35.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64.opt 2018-05-08 11:09:01.255467862 +0100
|
||||
@@ -115,6 +115,20 @@
|
||||
EnumValue
|
||||
Enum(aarch64_tls_size) String(48) Value(48)
|
||||
@@ -105,9 +105,9 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64.opt gcc-7.3.0-RC-20
|
||||
march=
|
||||
Target RejectNegative ToLower Joined Var(aarch64_arch_string)
|
||||
-march=ARCH Use features of architecture ARCH.
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64-opts.h gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64-opts.h
|
||||
--- gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64-opts.h 2017-01-20 00:03:20.347898000 +0000
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/aarch64-opts.h 2018-01-22 20:15:07.232099998 +0000
|
||||
diff -NBaur gcc-8.1.0/gcc/config/aarch64/aarch64-opts.h gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64-opts.h
|
||||
--- gcc-8.1.0/gcc/config/aarch64/aarch64-opts.h 2018-01-13 17:50:35.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/gcc/config/aarch64/aarch64-opts.h 2018-05-08 11:09:01.255467862 +0100
|
||||
@@ -48,6 +48,12 @@
|
||||
TLS_DESCRIPTORS
|
||||
};
|
||||
@@ -121,9 +121,9 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/aarch64-opts.h gcc-7.3.0-RC
|
||||
/* The code model defines the address generation strategy.
|
||||
Most have a PIC and non-PIC variant. */
|
||||
enum aarch64_code_model {
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/t-aarch64 gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/t-aarch64
|
||||
--- gcc-7.3.0-RC-20180122/gcc/config/aarch64/t-aarch64 2017-01-01 12:07:43.905435000 +0000
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/config/aarch64/t-aarch64 2018-01-22 20:15:07.236099934 +0000
|
||||
diff -NBaur gcc-8.1.0/gcc/config/aarch64/t-aarch64 gcc-8.1.0-aarch64/gcc/config/aarch64/t-aarch64
|
||||
--- gcc-8.1.0/gcc/config/aarch64/t-aarch64 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/gcc/config/aarch64/t-aarch64 2018-05-08 11:09:01.255467862 +0100
|
||||
@@ -68,5 +68,7 @@
|
||||
$(srcdir)/config/aarch64/cortex-a57-fma-steering.c
|
||||
|
||||
@@ -134,10 +134,10 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/config/aarch64/t-aarch64 gcc-7.3.0-RC-2018
|
||||
+MULTILIB_DIRNAMES = large pic
|
||||
+MULTILIB_REQUIRED = mcmodel=large fPIC
|
||||
+MULTILIB_MATCHES = fPIC=fpic fPIC=fpie fPIC=fPIE
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/gcc/gcc.c gcc-7.3.0-RC-20180122-aarch64/gcc/gcc.c
|
||||
--- gcc-7.3.0-RC-20180122/gcc/gcc.c 2017-09-15 09:18:34.015147000 +0100
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/gcc/gcc.c 2018-01-22 20:15:07.236099934 +0000
|
||||
@@ -779,6 +779,11 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/gcc.c gcc-8.1.0-aarch64/gcc/gcc.c
|
||||
--- gcc-8.1.0/gcc/gcc.c 2018-02-09 06:44:06.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/gcc/gcc.c 2018-05-08 11:09:01.259467885 +0100
|
||||
@@ -786,6 +786,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -149,7 +149,7 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/gcc.c gcc-7.3.0-RC-20180122-aarch64/gcc/gc
|
||||
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
|
||||
#ifndef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
@@ -1074,6 +1079,7 @@
|
||||
@@ -1081,6 +1086,7 @@
|
||||
static const char *lib_spec = LIB_SPEC;
|
||||
static const char *link_gomp_spec = "";
|
||||
static const char *libgcc_spec = LIBGCC_SPEC;
|
||||
@@ -157,7 +157,7 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/gcc.c gcc-7.3.0-RC-20180122-aarch64/gcc/gc
|
||||
static const char *endfile_spec = ENDFILE_SPEC;
|
||||
static const char *startfile_spec = STARTFILE_SPEC;
|
||||
static const char *linker_name_spec = LINKER_NAME;
|
||||
@@ -1579,6 +1585,7 @@
|
||||
@@ -1577,6 +1583,7 @@
|
||||
INIT_STATIC_SPEC ("lib", &lib_spec),
|
||||
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
|
||||
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
|
||||
@@ -165,9 +165,9 @@ diff -NBaur gcc-7.3.0-RC-20180122/gcc/gcc.c gcc-7.3.0-RC-20180122-aarch64/gcc/gc
|
||||
INIT_STATIC_SPEC ("startfile", &startfile_spec),
|
||||
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
|
||||
INIT_STATIC_SPEC ("version", &compiler_version),
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/libgcc/crtstuff.c gcc-7.3.0-RC-20180122-aarch64/libgcc/crtstuff.c
|
||||
--- gcc-7.3.0-RC-20180122/libgcc/crtstuff.c 2017-01-01 12:07:43.905435000 +0000
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/libgcc/crtstuff.c 2018-01-22 20:15:07.236099934 +0000
|
||||
diff -NBaur gcc-8.1.0/libgcc/crtstuff.c gcc-8.1.0-aarch64/libgcc/crtstuff.c
|
||||
--- gcc-8.1.0/libgcc/crtstuff.c 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/libgcc/crtstuff.c 2018-05-08 11:09:01.259467885 +0100
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
/* Target machine header files require this define. */
|
||||
@@ -176,10 +176,10 @@ diff -NBaur gcc-7.3.0-RC-20180122/libgcc/crtstuff.c gcc-7.3.0-RC-20180122-aarch6
|
||||
|
||||
/* FIXME: Including auto-host is incorrect, but until we have
|
||||
identified the set of defines that need to go into auto-target.h,
|
||||
diff -NBaur gcc-7.3.0-RC-20180122/libgcc/Makefile.in gcc-7.3.0-RC-20180122-aarch64/libgcc/Makefile.in
|
||||
--- gcc-7.3.0-RC-20180122/libgcc/Makefile.in 2017-04-19 09:08:44.446150000 +0100
|
||||
+++ gcc-7.3.0-RC-20180122-aarch64/libgcc/Makefile.in 2018-01-22 20:15:07.236099934 +0000
|
||||
@@ -844,7 +844,7 @@
|
||||
diff -NBaur gcc-8.1.0/libgcc/Makefile.in gcc-8.1.0-aarch64/libgcc/Makefile.in
|
||||
--- gcc-8.1.0/libgcc/Makefile.in 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-aarch64/libgcc/Makefile.in 2018-05-08 11:09:01.259467885 +0100
|
||||
@@ -847,7 +847,7 @@
|
||||
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
|
||||
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/libgloss/configure b/libgloss/configure
|
||||
index aa6f8f834..0e8579890 100755
|
||||
index aa6f8f8..0e85798 100755
|
||||
--- a/libgloss/configure
|
||||
+++ b/libgloss/configure
|
||||
@@ -2594,6 +2594,8 @@ if test "${config_libnosys}" = "true"; then
|
||||
@@ -12,7 +12,7 @@ index aa6f8f834..0e8579890 100755
|
||||
|
||||
ac_config_commands="$ac_config_commands depfiles"
|
||||
diff --git a/libgloss/configure.in b/libgloss/configure.in
|
||||
index 6da164352..f18f17447 100644
|
||||
index 6da1643..f18f174 100644
|
||||
--- a/libgloss/configure.in
|
||||
+++ b/libgloss/configure.in
|
||||
@@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
@@ -33,7 +33,7 @@ index 6da164352..f18f17447 100644
|
||||
AS=${AS-as}
|
||||
diff --git a/libgloss/libsysbase/Makefile.in b/libgloss/libsysbase/Makefile.in
|
||||
new file mode 100644
|
||||
index 000000000..597525792
|
||||
index 0000000..9eca37c
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/Makefile.in
|
||||
@@ -0,0 +1,148 @@
|
||||
@@ -104,7 +104,7 @@ index 000000000..597525792
|
||||
+ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
|
||||
+
|
||||
+# object files needed
|
||||
+OBJS = abort.o iosupport.o close.o environ.o execve.o fork.o fstat.o getpid.o gettod.o \
|
||||
+OBJS = abort.o iosupport.o clocks.o close.o environ.o execve.o fork.o fstat.o getpid.o gettod.o \
|
||||
+ isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o times.o \
|
||||
+ unlink.o wait.o write.o _exit.o malloc_vars.o \
|
||||
+ chdir.o mkdir.o rename.o statvfs.o \
|
||||
@@ -187,7 +187,7 @@ index 000000000..597525792
|
||||
+ $(SHELL) config.status --recheck
|
||||
diff --git a/libgloss/libsysbase/_exit.c b/libgloss/libsysbase/_exit.c
|
||||
new file mode 100644
|
||||
index 000000000..e5cb5a9ed
|
||||
index 0000000..e5cb5a9
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/_exit.c
|
||||
@@ -0,0 +1,17 @@
|
||||
@@ -210,7 +210,7 @@ index 000000000..e5cb5a9ed
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/abort.c b/libgloss/libsysbase/abort.c
|
||||
new file mode 100644
|
||||
index 000000000..9272e22c9
|
||||
index 0000000..9272e22
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/abort.c
|
||||
@@ -0,0 +1,8 @@
|
||||
@@ -224,7 +224,7 @@ index 000000000..9272e22c9
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/acconfig.h b/libgloss/libsysbase/acconfig.h
|
||||
new file mode 100644
|
||||
index 000000000..200ea7873
|
||||
index 0000000..200ea78
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/acconfig.h
|
||||
@@ -0,0 +1,29 @@
|
||||
@@ -259,7 +259,7 @@ index 000000000..200ea7873
|
||||
+#undef __SYMBOL_PREFIX
|
||||
diff --git a/libgloss/libsysbase/aclocal.m4 b/libgloss/libsysbase/aclocal.m4
|
||||
new file mode 100644
|
||||
index 000000000..b6cdfaeb8
|
||||
index 0000000..b6cdfae
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/aclocal.m4
|
||||
@@ -0,0 +1,344 @@
|
||||
@@ -609,7 +609,7 @@ index 000000000..b6cdfaeb8
|
||||
+m4_include([../acinclude.m4])
|
||||
diff --git a/libgloss/libsysbase/chdir.c b/libgloss/libsysbase/chdir.c
|
||||
new file mode 100644
|
||||
index 000000000..90d2dc5b7
|
||||
index 0000000..90d2dc5
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/chdir.c
|
||||
@@ -0,0 +1,201 @@
|
||||
@@ -816,7 +816,7 @@ index 000000000..90d2dc5b7
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/chmod.c b/libgloss/libsysbase/chmod.c
|
||||
new file mode 100644
|
||||
index 000000000..3668b5801
|
||||
index 0000000..3668b58
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/chmod.c
|
||||
@@ -0,0 +1,30 @@
|
||||
@@ -850,9 +850,49 @@ index 000000000..3668b5801
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/clocks.c b/libgloss/libsysbase/clocks.c
|
||||
new file mode 100644
|
||||
index 0000000..7cec3bc
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/clocks.c
|
||||
@@ -0,0 +1,34 @@
|
||||
+#include <errno.h>
|
||||
+#include <time.h>
|
||||
+#include <sys/iosupport.h>
|
||||
+
|
||||
+int clock_gettime(clockid_t clock_id, struct timespec *tp)
|
||||
+{
|
||||
+ if ( __syscalls.clock_gettime ) {
|
||||
+ return __syscalls.clock_gettime(clock_id, tp);
|
||||
+ } else {
|
||||
+ errno = ENOSYS;
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int clock_settime(clockid_t clock_id, const struct timespec *tp)
|
||||
+{
|
||||
+ if ( __syscalls.clock_gettime ) {
|
||||
+ return __syscalls.clock_settime(clock_id, tp);
|
||||
+ } else {
|
||||
+ errno = ENOSYS;
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int clock_getres (clockid_t clock_id, struct timespec *res)
|
||||
+{
|
||||
+ if ( __syscalls.clock_getres ) {
|
||||
+ return __syscalls.clock_getres(clock_id, res);
|
||||
+ } else {
|
||||
+ errno = ENOSYS;
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/close.c b/libgloss/libsysbase/close.c
|
||||
new file mode 100644
|
||||
index 000000000..931ad07b1
|
||||
index 0000000..931ad07
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/close.c
|
||||
@@ -0,0 +1,46 @@
|
||||
@@ -904,7 +944,7 @@ index 000000000..931ad07b1
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/config.h.in b/libgloss/libsysbase/config.h.in
|
||||
new file mode 100644
|
||||
index 000000000..48ce950b4
|
||||
index 0000000..48ce950
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/config.h.in
|
||||
@@ -0,0 +1,25 @@
|
||||
@@ -935,7 +975,7 @@ index 000000000..48ce950b4
|
||||
+#undef __SYMBOL_PREFIX
|
||||
diff --git a/libgloss/libsysbase/configure b/libgloss/libsysbase/configure
|
||||
new file mode 100644
|
||||
index 000000000..aa653c235
|
||||
index 0000000..aa653c2
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/configure
|
||||
@@ -0,0 +1,4160 @@
|
||||
@@ -5101,7 +5141,7 @@ index 000000000..aa653c235
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/configure.in b/libgloss/libsysbase/configure.in
|
||||
new file mode 100644
|
||||
index 000000000..da85a3f46
|
||||
index 0000000..da85a3f
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/configure.in
|
||||
@@ -0,0 +1,202 @@
|
||||
@@ -5309,7 +5349,7 @@ index 000000000..da85a3f46
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/dirent.c b/libgloss/libsysbase/dirent.c
|
||||
new file mode 100644
|
||||
index 000000000..0ad29029c
|
||||
index 0000000..0ad2902
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/dirent.c
|
||||
@@ -0,0 +1,255 @@
|
||||
@@ -5570,7 +5610,7 @@ index 000000000..0ad29029c
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/environ.c b/libgloss/libsysbase/environ.c
|
||||
new file mode 100644
|
||||
index 000000000..1c485b26f
|
||||
index 0000000..1c485b2
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/environ.c
|
||||
@@ -0,0 +1,6 @@
|
||||
@@ -5582,7 +5622,7 @@ index 000000000..1c485b26f
|
||||
+char **environ = __env;
|
||||
diff --git a/libgloss/libsysbase/execve.c b/libgloss/libsysbase/execve.c
|
||||
new file mode 100644
|
||||
index 000000000..82e70139f
|
||||
index 0000000..82e7013
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/execve.c
|
||||
@@ -0,0 +1,30 @@
|
||||
@@ -5618,7 +5658,7 @@ index 000000000..82e70139f
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/fchmod.c b/libgloss/libsysbase/fchmod.c
|
||||
new file mode 100644
|
||||
index 000000000..5c5831cdf
|
||||
index 0000000..5c5831c
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/fchmod.c
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -5655,7 +5695,7 @@ index 000000000..5c5831cdf
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/flock.c b/libgloss/libsysbase/flock.c
|
||||
new file mode 100644
|
||||
index 000000000..c6b8c92ad
|
||||
index 0000000..c6b8c92
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/flock.c
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -5682,7 +5722,7 @@ index 000000000..c6b8c92ad
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/fork.c b/libgloss/libsysbase/fork.c
|
||||
new file mode 100644
|
||||
index 000000000..efb6a3496
|
||||
index 0000000..efb6a34
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/fork.c
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -5709,7 +5749,7 @@ index 000000000..efb6a3496
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/fstat.c b/libgloss/libsysbase/fstat.c
|
||||
new file mode 100644
|
||||
index 000000000..e32b06755
|
||||
index 0000000..e32b067
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/fstat.c
|
||||
@@ -0,0 +1,44 @@
|
||||
@@ -5759,7 +5799,7 @@ index 000000000..e32b06755
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/fsync.c b/libgloss/libsysbase/fsync.c
|
||||
new file mode 100644
|
||||
index 000000000..fb06cb6d1
|
||||
index 0000000..fb06cb6
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/fsync.c
|
||||
@@ -0,0 +1,34 @@
|
||||
@@ -5799,7 +5839,7 @@ index 000000000..fb06cb6d1
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/ftruncate.c b/libgloss/libsysbase/ftruncate.c
|
||||
new file mode 100644
|
||||
index 000000000..2cc03a3d9
|
||||
index 0000000..2cc03a3
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/ftruncate.c
|
||||
@@ -0,0 +1,34 @@
|
||||
@@ -5839,7 +5879,7 @@ index 000000000..2cc03a3d9
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/getpid.c b/libgloss/libsysbase/getpid.c
|
||||
new file mode 100644
|
||||
index 000000000..fdce14b5f
|
||||
index 0000000..fdce14b
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/getpid.c
|
||||
@@ -0,0 +1,19 @@
|
||||
@@ -5864,7 +5904,7 @@ index 000000000..fdce14b5f
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/getreent.c b/libgloss/libsysbase/getreent.c
|
||||
new file mode 100644
|
||||
index 000000000..028d0eb77
|
||||
index 0000000..028d0eb
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/getreent.c
|
||||
@@ -0,0 +1,20 @@
|
||||
@@ -5890,7 +5930,7 @@ index 000000000..028d0eb77
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/gettod.c b/libgloss/libsysbase/gettod.c
|
||||
new file mode 100644
|
||||
index 000000000..9d5b74724
|
||||
index 0000000..9d5b747
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/gettod.c
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -5929,7 +5969,7 @@ index 000000000..9d5b74724
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/handle_manager.c b/libgloss/libsysbase/handle_manager.c
|
||||
new file mode 100644
|
||||
index 000000000..f3fcc88f7
|
||||
index 0000000..f3fcc88
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/handle_manager.c
|
||||
@@ -0,0 +1,173 @@
|
||||
@@ -6108,7 +6148,7 @@ index 000000000..f3fcc88f7
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/iosupport.c b/libgloss/libsysbase/iosupport.c
|
||||
new file mode 100644
|
||||
index 000000000..4f131275e
|
||||
index 0000000..4f13127
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/iosupport.c
|
||||
@@ -0,0 +1,138 @@
|
||||
@@ -6252,7 +6292,7 @@ index 000000000..4f131275e
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/isatty.c b/libgloss/libsysbase/isatty.c
|
||||
new file mode 100644
|
||||
index 000000000..280a4579a
|
||||
index 0000000..280a457
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/isatty.c
|
||||
@@ -0,0 +1,17 @@
|
||||
@@ -6275,7 +6315,7 @@ index 000000000..280a4579a
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/kill.c b/libgloss/libsysbase/kill.c
|
||||
new file mode 100644
|
||||
index 000000000..13bd0fba1
|
||||
index 0000000..13bd0fb
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/kill.c
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -6302,7 +6342,7 @@ index 000000000..13bd0fba1
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/link.c b/libgloss/libsysbase/link.c
|
||||
new file mode 100644
|
||||
index 000000000..1675e5c24
|
||||
index 0000000..1675e5c
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/link.c
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -6341,7 +6381,7 @@ index 000000000..1675e5c24
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/lseek.c b/libgloss/libsysbase/lseek.c
|
||||
new file mode 100644
|
||||
index 000000000..eb232c86b
|
||||
index 0000000..eb232c8
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/lseek.c
|
||||
@@ -0,0 +1,45 @@
|
||||
@@ -6392,7 +6432,7 @@ index 000000000..eb232c86b
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/malloc_vars.c b/libgloss/libsysbase/malloc_vars.c
|
||||
new file mode 100644
|
||||
index 000000000..456590956
|
||||
index 0000000..4565909
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/malloc_vars.c
|
||||
@@ -0,0 +1,2 @@
|
||||
@@ -6400,7 +6440,7 @@ index 000000000..456590956
|
||||
+char *fake_heap_start = (char*)0;
|
||||
diff --git a/libgloss/libsysbase/mkdir.c b/libgloss/libsysbase/mkdir.c
|
||||
new file mode 100644
|
||||
index 000000000..b4fcbd3d7
|
||||
index 0000000..b4fcbd3
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/mkdir.c
|
||||
@@ -0,0 +1,19 @@
|
||||
@@ -6425,7 +6465,7 @@ index 000000000..b4fcbd3d7
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/open.c b/libgloss/libsysbase/open.c
|
||||
new file mode 100644
|
||||
index 000000000..f8d98fd3b
|
||||
index 0000000..f8d98fd
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/open.c
|
||||
@@ -0,0 +1,53 @@
|
||||
@@ -6484,7 +6524,7 @@ index 000000000..f8d98fd3b
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/read.c b/libgloss/libsysbase/read.c
|
||||
new file mode 100644
|
||||
index 000000000..838a8c796
|
||||
index 0000000..838a8c7
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/read.c
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -6529,7 +6569,7 @@ index 000000000..838a8c796
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/rename.c b/libgloss/libsysbase/rename.c
|
||||
new file mode 100644
|
||||
index 000000000..97a056a72
|
||||
index 0000000..97a056a
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/rename.c
|
||||
@@ -0,0 +1,34 @@
|
||||
@@ -6569,7 +6609,7 @@ index 000000000..97a056a72
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/rmdir.c b/libgloss/libsysbase/rmdir.c
|
||||
new file mode 100644
|
||||
index 000000000..2692a2997
|
||||
index 0000000..2692a29
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/rmdir.c
|
||||
@@ -0,0 +1,25 @@
|
||||
@@ -6600,7 +6640,7 @@ index 000000000..2692a2997
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/sbrk.c b/libgloss/libsysbase/sbrk.c
|
||||
new file mode 100644
|
||||
index 000000000..5dd550c5c
|
||||
index 0000000..5dd550c
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/sbrk.c
|
||||
@@ -0,0 +1,60 @@
|
||||
@@ -6666,7 +6706,7 @@ index 000000000..5dd550c5c
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/stat.c b/libgloss/libsysbase/stat.c
|
||||
new file mode 100644
|
||||
index 000000000..d0ad00202
|
||||
index 0000000..d0ad002
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/stat.c
|
||||
@@ -0,0 +1,38 @@
|
||||
@@ -6710,7 +6750,7 @@ index 000000000..d0ad00202
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/statvfs.c b/libgloss/libsysbase/statvfs.c
|
||||
new file mode 100644
|
||||
index 000000000..84e221340
|
||||
index 0000000..84e2213
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/statvfs.c
|
||||
@@ -0,0 +1,24 @@
|
||||
@@ -6740,7 +6780,7 @@ index 000000000..84e221340
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/syscall_support.c b/libgloss/libsysbase/syscall_support.c
|
||||
new file mode 100644
|
||||
index 000000000..044f12d16
|
||||
index 0000000..044f12d
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/syscall_support.c
|
||||
@@ -0,0 +1,99 @@
|
||||
@@ -6845,7 +6885,7 @@ index 000000000..044f12d16
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/times.c b/libgloss/libsysbase/times.c
|
||||
new file mode 100644
|
||||
index 000000000..79484e7f4
|
||||
index 0000000..79484e7
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/times.c
|
||||
@@ -0,0 +1,17 @@
|
||||
@@ -6868,7 +6908,7 @@ index 000000000..79484e7f4
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/truncate.c b/libgloss/libsysbase/truncate.c
|
||||
new file mode 100644
|
||||
index 000000000..849525990
|
||||
index 0000000..8495259
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/truncate.c
|
||||
@@ -0,0 +1,54 @@
|
||||
@@ -6928,7 +6968,7 @@ index 000000000..849525990
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/unlink.c b/libgloss/libsysbase/unlink.c
|
||||
new file mode 100644
|
||||
index 000000000..7920b79ac
|
||||
index 0000000..7920b79
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/unlink.c
|
||||
@@ -0,0 +1,34 @@
|
||||
@@ -6968,7 +7008,7 @@ index 000000000..7920b79ac
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/wait.c b/libgloss/libsysbase/wait.c
|
||||
new file mode 100644
|
||||
index 000000000..247486e42
|
||||
index 0000000..247486e
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/wait.c
|
||||
@@ -0,0 +1,24 @@
|
||||
@@ -6998,7 +7038,7 @@ index 000000000..247486e42
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/warning.h b/libgloss/libsysbase/warning.h
|
||||
new file mode 100644
|
||||
index 000000000..2c2998250
|
||||
index 0000000..2c29982
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/warning.h
|
||||
@@ -0,0 +1,43 @@
|
||||
@@ -7047,7 +7087,7 @@ index 000000000..2c2998250
|
||||
+#endif /* __WARNING_H__ */
|
||||
diff --git a/libgloss/libsysbase/write.c b/libgloss/libsysbase/write.c
|
||||
new file mode 100644
|
||||
index 000000000..61de918bc
|
||||
index 0000000..61de918
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/write.c
|
||||
@@ -0,0 +1,38 @@
|
||||
@@ -7090,7 +7130,7 @@ index 000000000..61de918bc
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/newlib/configure.host b/newlib/configure.host
|
||||
index eb645868b..d536e0daa 100644
|
||||
index eb64586..d536e0d 100644
|
||||
--- a/newlib/configure.host
|
||||
+++ b/newlib/configure.host
|
||||
@@ -624,13 +624,25 @@ newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVID
|
||||
@@ -7120,7 +7160,7 @@ index eb645868b..d536e0daa 100644
|
||||
syscall_dir=syscalls
|
||||
;;
|
||||
diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
|
||||
index cbc0fa989..5326f7259 100644
|
||||
index cbc0fa9..5326f72 100644
|
||||
--- a/newlib/libc/include/stdio.h
|
||||
+++ b/newlib/libc/include/stdio.h
|
||||
@@ -227,13 +227,13 @@ int fgetpos (FILE *, _fpos_t *);
|
||||
@@ -7152,7 +7192,7 @@ index cbc0fa989..5326f7259 100644
|
||||
void _rewind_r (struct _reent *, FILE *);
|
||||
size_t _fwrite_r (struct _reent *, const void *__restrict, size_t _size, size_t _n, FILE *__restrict);
|
||||
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h
|
||||
index 2082dfdb1..e535f189b 100644
|
||||
index 2082dfd..e535f18 100644
|
||||
--- a/newlib/libc/include/sys/config.h
|
||||
+++ b/newlib/libc/include/sys/config.h
|
||||
@@ -4,6 +4,9 @@
|
||||
@@ -7166,7 +7206,7 @@ index 2082dfdb1..e535f189b 100644
|
||||
#define MALLOC_ALIGNMENT 16
|
||||
#endif
|
||||
diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h
|
||||
index a3fb5c02c..1ead46ba0 100644
|
||||
index a3fb5c0..1ead46b 100644
|
||||
--- a/newlib/libc/include/sys/dirent.h
|
||||
+++ b/newlib/libc/include/sys/dirent.h
|
||||
@@ -1,13 +1,52 @@
|
||||
@@ -7225,12 +7265,26 @@ index a3fb5c02c..1ead46ba0 100644
|
||||
#endif
|
||||
+
|
||||
+#endif // _dirent_h_
|
||||
diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/include/sys/features.h
|
||||
index 2900b33..6efb54e 100644
|
||||
--- a/newlib/libc/include/sys/features.h
|
||||
+++ b/newlib/libc/include/sys/features.h
|
||||
@@ -330,6 +330,9 @@ extern "C" {
|
||||
# define __SSP_FORTIFY_LEVEL 0
|
||||
#endif
|
||||
|
||||
+#define _POSIX_MONOTONIC_CLOCK 200112L
|
||||
+#define _POSIX_TIMERS 1
|
||||
+
|
||||
/* RTEMS adheres to POSIX -- 1003.1b with some features from annexes. */
|
||||
|
||||
#ifdef __rtems__
|
||||
diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h
|
||||
new file mode 100644
|
||||
index 000000000..10a6a716d
|
||||
index 0000000..cc3acdd
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/include/sys/iosupport.h
|
||||
@@ -0,0 +1,105 @@
|
||||
@@ -0,0 +1,109 @@
|
||||
+//---------------------------------------------------------------------------------
|
||||
+#ifndef __iosupp_h__
|
||||
+#define __iosupp_h__
|
||||
@@ -7243,6 +7297,7 @@ index 000000000..10a6a716d
|
||||
+#include <reent.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/statvfs.h>
|
||||
+#include <time.h>
|
||||
+
|
||||
+enum {
|
||||
+ STD_IN,
|
||||
@@ -7315,6 +7370,9 @@ index 000000000..10a6a716d
|
||||
+ void (*lock_release_recursive) (_LOCK_RECURSIVE_T *lock);
|
||||
+ void (*lock_close_recursive) (_LOCK_RECURSIVE_T *lock);
|
||||
+ struct _reent *(*getreent) ();
|
||||
+ int (*clock_gettime)(clockid_t clock_id, struct timespec *tp);
|
||||
+ int (*clock_settime)(clockid_t clock_id, const struct timespec *tp);
|
||||
+ int (*clock_getres)(clockid_t clock_id, struct timespec *res);
|
||||
+} __syscalls_t;
|
||||
+
|
||||
+extern __syscalls_t __syscalls;
|
||||
@@ -7337,7 +7395,7 @@ index 000000000..10a6a716d
|
||||
+#endif // __iosupp_h__
|
||||
+//---------------------------------------------------------------------------------
|
||||
diff --git a/newlib/libc/include/sys/lock.h b/newlib/libc/include/sys/lock.h
|
||||
index 528904957..a755d6443 100644
|
||||
index 5289049..a755d64 100644
|
||||
--- a/newlib/libc/include/sys/lock.h
|
||||
+++ b/newlib/libc/include/sys/lock.h
|
||||
@@ -1,69 +1,66 @@
|
||||
@@ -7472,7 +7530,7 @@ index 528904957..a755d6443 100644
|
||||
-#endif /* __SYS_LOCK_H__ */
|
||||
+#endif // __SYS_LOCK_H__
|
||||
diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
|
||||
index 1ef226194..ce3721a14 100644
|
||||
index 1ef2261..ce3721a 100644
|
||||
--- a/newlib/libc/include/sys/reent.h
|
||||
+++ b/newlib/libc/include/sys/reent.h
|
||||
@@ -416,6 +416,8 @@ struct _reent
|
||||
@@ -7494,7 +7552,7 @@ index 1ef226194..ce3721a14 100644
|
||||
#ifdef _REENT_GLOBAL_STDIO_STREAMS
|
||||
diff --git a/newlib/libc/include/sys/statvfs.h b/newlib/libc/include/sys/statvfs.h
|
||||
new file mode 100644
|
||||
index 000000000..380329d34
|
||||
index 0000000..380329d
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/include/sys/statvfs.h
|
||||
@@ -0,0 +1,35 @@
|
||||
@@ -7535,7 +7593,7 @@ index 000000000..380329d34
|
||||
+#endif // _SYS_STATVFS_H
|
||||
\ No newline at end of file
|
||||
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
|
||||
index baa5451a6..a11f89473 100644
|
||||
index baa5451..a11f894 100644
|
||||
--- a/newlib/libc/locale/locale.c
|
||||
+++ b/newlib/libc/locale/locale.c
|
||||
@@ -91,7 +91,7 @@ beginning with <<"LC_">>.
|
||||
@@ -7655,8 +7713,124 @@ index baa5451a6..a11f89473 100644
|
||||
{
|
||||
return __get_current_locale ()->ctype_ptr;
|
||||
}
|
||||
diff --git a/newlib/libc/machine/aarch64/Makefile.am b/newlib/libc/machine/aarch64/Makefile.am
|
||||
index e8b8197..011f69d 100644
|
||||
--- a/newlib/libc/machine/aarch64/Makefile.am
|
||||
+++ b/newlib/libc/machine/aarch64/Makefile.am
|
||||
@@ -9,6 +9,7 @@ AM_CCASFLAGS = $(INCLUDES)
|
||||
noinst_LIBRARIES = lib.a
|
||||
|
||||
lib_a_SOURCES =
|
||||
+lib_a_SOURCES += access.c
|
||||
lib_a_SOURCES += memchr-stub.c
|
||||
lib_a_SOURCES += memchr.S
|
||||
lib_a_SOURCES += memcmp-stub.c
|
||||
diff --git a/newlib/libc/machine/aarch64/Makefile.in b/newlib/libc/machine/aarch64/Makefile.in
|
||||
index 39b23a1..9695124 100644
|
||||
--- a/newlib/libc/machine/aarch64/Makefile.in
|
||||
+++ b/newlib/libc/machine/aarch64/Makefile.in
|
||||
@@ -69,22 +69,22 @@ LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
lib_a_AR = $(AR) $(ARFLAGS)
|
||||
lib_a_LIBADD =
|
||||
-am_lib_a_OBJECTS = lib_a-memchr-stub.$(OBJEXT) lib_a-memchr.$(OBJEXT) \
|
||||
- lib_a-memcmp-stub.$(OBJEXT) lib_a-memcmp.$(OBJEXT) \
|
||||
- lib_a-memcpy-stub.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \
|
||||
- lib_a-memmove-stub.$(OBJEXT) lib_a-memmove.$(OBJEXT) \
|
||||
- lib_a-memset-stub.$(OBJEXT) lib_a-memset.$(OBJEXT) \
|
||||
- lib_a-rawmemchr.$(OBJEXT) lib_a-rawmemchr-stub.$(OBJEXT) \
|
||||
- lib_a-setjmp.$(OBJEXT) lib_a-stpcpy-stub.$(OBJEXT) \
|
||||
- lib_a-stpcpy.$(OBJEXT) lib_a-strchr-stub.$(OBJEXT) \
|
||||
- lib_a-strchr.$(OBJEXT) lib_a-strchrnul-stub.$(OBJEXT) \
|
||||
- lib_a-strchrnul.$(OBJEXT) lib_a-strcmp-stub.$(OBJEXT) \
|
||||
- lib_a-strcmp.$(OBJEXT) lib_a-strcpy-stub.$(OBJEXT) \
|
||||
- lib_a-strcpy.$(OBJEXT) lib_a-strlen-stub.$(OBJEXT) \
|
||||
- lib_a-strlen.$(OBJEXT) lib_a-strncmp-stub.$(OBJEXT) \
|
||||
- lib_a-strncmp.$(OBJEXT) lib_a-strnlen-stub.$(OBJEXT) \
|
||||
- lib_a-strnlen.$(OBJEXT) lib_a-strrchr-stub.$(OBJEXT) \
|
||||
- lib_a-strrchr.$(OBJEXT)
|
||||
+am_lib_a_OBJECTS = lib_a-access.$(OBJEXT) lib_a-memchr-stub.$(OBJEXT) \
|
||||
+ lib_a-memchr.$(OBJEXT) lib_a-memcmp-stub.$(OBJEXT) \
|
||||
+ lib_a-memcmp.$(OBJEXT) lib_a-memcpy-stub.$(OBJEXT) \
|
||||
+ lib_a-memcpy.$(OBJEXT) lib_a-memmove-stub.$(OBJEXT) \
|
||||
+ lib_a-memmove.$(OBJEXT) lib_a-memset-stub.$(OBJEXT) \
|
||||
+ lib_a-memset.$(OBJEXT) lib_a-rawmemchr.$(OBJEXT) \
|
||||
+ lib_a-rawmemchr-stub.$(OBJEXT) lib_a-setjmp.$(OBJEXT) \
|
||||
+ lib_a-stpcpy-stub.$(OBJEXT) lib_a-stpcpy.$(OBJEXT) \
|
||||
+ lib_a-strchr-stub.$(OBJEXT) lib_a-strchr.$(OBJEXT) \
|
||||
+ lib_a-strchrnul-stub.$(OBJEXT) lib_a-strchrnul.$(OBJEXT) \
|
||||
+ lib_a-strcmp-stub.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \
|
||||
+ lib_a-strcpy-stub.$(OBJEXT) lib_a-strcpy.$(OBJEXT) \
|
||||
+ lib_a-strlen-stub.$(OBJEXT) lib_a-strlen.$(OBJEXT) \
|
||||
+ lib_a-strncmp-stub.$(OBJEXT) lib_a-strncmp.$(OBJEXT) \
|
||||
+ lib_a-strnlen-stub.$(OBJEXT) lib_a-strnlen.$(OBJEXT) \
|
||||
+ lib_a-strrchr-stub.$(OBJEXT) lib_a-strrchr.$(OBJEXT)
|
||||
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp =
|
||||
@@ -210,7 +210,7 @@ AUTOMAKE_OPTIONS = cygnus
|
||||
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
AM_CCASFLAGS = $(INCLUDES)
|
||||
noinst_LIBRARIES = lib.a
|
||||
-lib_a_SOURCES = memchr-stub.c memchr.S memcmp-stub.c memcmp.S \
|
||||
+lib_a_SOURCES = access.c memchr-stub.c memchr.S memcmp-stub.c memcmp.S \
|
||||
memcpy-stub.c memcpy.S memmove-stub.c memmove.S memset-stub.c \
|
||||
memset.S rawmemchr.S rawmemchr-stub.c setjmp.S stpcpy-stub.c \
|
||||
stpcpy.S strchr-stub.c strchr.S strchrnul-stub.c strchrnul.S \
|
||||
@@ -381,6 +381,12 @@ lib_a-strrchr.obj: strrchr.S
|
||||
.c.obj:
|
||||
$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
+lib_a-access.o: access.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c
|
||||
+
|
||||
+lib_a-access.obj: access.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi`
|
||||
+
|
||||
lib_a-memchr-stub.o: memchr-stub.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-memchr-stub.o `test -f 'memchr-stub.c' || echo '$(srcdir)/'`memchr-stub.c
|
||||
|
||||
diff --git a/newlib/libc/machine/aarch64/access.c b/newlib/libc/machine/aarch64/access.c
|
||||
new file mode 100644
|
||||
index 0000000..980682e
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/machine/aarch64/access.c
|
||||
@@ -0,0 +1,33 @@
|
||||
+/* This is file ACCESS.C */
|
||||
+/*
|
||||
+ * Copyright (C) 1993 DJ Delorie
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
+ * Redistribution, modification, and use in source and binary forms is permitted
|
||||
+ * provided that the above copyright notice and following paragraph are
|
||||
+ * duplicated in all such forms.
|
||||
+ *
|
||||
+ * This file is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+ */
|
||||
+
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int access(const char *fn, int flags)
|
||||
+{
|
||||
+ struct stat s;
|
||||
+ if (stat(fn, &s))
|
||||
+ return -1;
|
||||
+ if (s.st_mode & S_IFDIR)
|
||||
+ return 0;
|
||||
+ if (flags & W_OK)
|
||||
+ {
|
||||
+ if (s.st_mode & S_IWRITE)
|
||||
+ return 0;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
diff --git a/newlib/libc/machine/arm/Makefile.am b/newlib/libc/machine/arm/Makefile.am
|
||||
index 9bd35e733..731130092 100644
|
||||
index 9bd35e7..7311300 100644
|
||||
--- a/newlib/libc/machine/arm/Makefile.am
|
||||
+++ b/newlib/libc/machine/arm/Makefile.am
|
||||
@@ -11,7 +11,9 @@ noinst_LIBRARIES = lib.a
|
||||
@@ -7671,7 +7845,7 @@ index 9bd35e733..731130092 100644
|
||||
lib_a_SOURCES += memchr.S
|
||||
lib_a_SOURCES += memcpy-stub.c
|
||||
diff --git a/newlib/libc/machine/arm/Makefile.in b/newlib/libc/machine/arm/Makefile.in
|
||||
index d9dbcd5c3..43712f813 100644
|
||||
index d9dbcd5..43712f8 100644
|
||||
--- a/newlib/libc/machine/arm/Makefile.in
|
||||
+++ b/newlib/libc/machine/arm/Makefile.in
|
||||
@@ -75,10 +75,10 @@ am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \
|
||||
@@ -7715,7 +7889,7 @@ index d9dbcd5c3..43712f813 100644
|
||||
|
||||
diff --git a/newlib/libc/machine/arm/sync_synchronize.c b/newlib/libc/machine/arm/sync_synchronize.c
|
||||
new file mode 100644
|
||||
index 000000000..3acc9e094
|
||||
index 0000000..3acc9e0
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/machine/arm/sync_synchronize.c
|
||||
@@ -0,0 +1,10 @@
|
||||
@@ -7731,7 +7905,7 @@ index 000000000..3acc9e094
|
||||
+#endif
|
||||
diff --git a/newlib/libc/machine/arm/sys/stdio.h b/newlib/libc/machine/arm/sys/stdio.h
|
||||
new file mode 100644
|
||||
index 000000000..4eb278e2f
|
||||
index 0000000..4eb278e
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/machine/arm/sys/stdio.h
|
||||
@@ -0,0 +1,27 @@
|
||||
@@ -7763,7 +7937,7 @@ index 000000000..4eb278e2f
|
||||
+
|
||||
+#endif /* _NEWLIB_STDIO_H */
|
||||
diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
|
||||
index 5fa98e96b..ef8a15e1b 100644
|
||||
index 5fa98e9..ef8a15e 100644
|
||||
--- a/newlib/libc/reent/getreent.c
|
||||
+++ b/newlib/libc/reent/getreent.c
|
||||
@@ -1,3 +1,4 @@
|
||||
@@ -7778,7 +7952,7 @@ index 5fa98e96b..ef8a15e1b 100644
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/newlib/libc/reent/gettimeofdayr.c b/newlib/libc/reent/gettimeofdayr.c
|
||||
index 9b982a993..8c0aaac8c 100644
|
||||
index 9b982a9..8c0aaac 100644
|
||||
--- a/newlib/libc/reent/gettimeofdayr.c
|
||||
+++ b/newlib/libc/reent/gettimeofdayr.c
|
||||
@@ -51,7 +51,7 @@ DESCRIPTION
|
||||
@@ -7798,7 +7972,7 @@ index 9b982a993..8c0aaac8c 100644
|
||||
+*/
|
||||
#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
|
||||
diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c
|
||||
index b358d2b4a..29cec0229 100644
|
||||
index b358d2b..29cec02 100644
|
||||
--- a/newlib/libc/stdio/fread.c
|
||||
+++ b/newlib/libc/stdio/fread.c
|
||||
@@ -135,7 +135,7 @@ crlf_r (struct _reent * ptr,
|
||||
@@ -7845,7 +8019,7 @@ index b358d2b4a..29cec0229 100644
|
||||
/* no more input: return partial result */
|
||||
#ifdef __SCLE
|
||||
diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c
|
||||
index 9b3ea986c..7c633e11f 100644
|
||||
index 9b3ea98..7c633e1 100644
|
||||
--- a/newlib/libc/stdio/fseek.c
|
||||
+++ b/newlib/libc/stdio/fseek.c
|
||||
@@ -83,7 +83,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
|
||||
@@ -7867,7 +8041,7 @@ index 9b3ea986c..7c633e11f 100644
|
||||
{
|
||||
return _fseek_r (_REENT, fp, offset, whence);
|
||||
diff --git a/newlib/libc/stdio/ftell.c b/newlib/libc/stdio/ftell.c
|
||||
index e4a246199..f73baab68 100644
|
||||
index e4a2461..f73baab 100644
|
||||
--- a/newlib/libc/stdio/ftell.c
|
||||
+++ b/newlib/libc/stdio/ftell.c
|
||||
@@ -82,7 +82,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
|
||||
@@ -7889,7 +8063,7 @@ index e4a246199..f73baab68 100644
|
||||
{
|
||||
return _ftell_r (_REENT, fp);
|
||||
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
|
||||
index c4bf2dbe3..d756df37d 100644
|
||||
index c4bf2db..d756df3 100644
|
||||
--- a/newlib/libc/stdio/vfprintf.c
|
||||
+++ b/newlib/libc/stdio/vfprintf.c
|
||||
@@ -112,6 +112,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
|
||||
@@ -7920,7 +8094,7 @@ index c4bf2dbe3..d756df37d 100644
|
||||
if (ch == 'S' || (flags & LONGINT)) {
|
||||
mbstate_t ps;
|
||||
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c
|
||||
index b97235559..298f68a9c 100644
|
||||
index b972355..298f68a 100644
|
||||
--- a/newlib/libc/stdio/vfscanf.c
|
||||
+++ b/newlib/libc/stdio/vfscanf.c
|
||||
@@ -74,6 +74,8 @@ These are GNU extensions.
|
||||
@@ -7933,7 +8107,7 @@ index b97235559..298f68a9c 100644
|
||||
#include <reent.h>
|
||||
#include <newlib.h>
|
||||
diff --git a/newlib/libc/stdio/vfwprintf.c b/newlib/libc/stdio/vfwprintf.c
|
||||
index 980b31e3b..722be905e 100644
|
||||
index 980b31e..722be90 100644
|
||||
--- a/newlib/libc/stdio/vfwprintf.c
|
||||
+++ b/newlib/libc/stdio/vfwprintf.c
|
||||
@@ -92,6 +92,9 @@ SEEALSO
|
||||
@@ -7947,7 +8121,7 @@ index 980b31e3b..722be905e 100644
|
||||
|
||||
#ifdef INTEGER_ONLY
|
||||
diff --git a/newlib/libc/stdio/vfwscanf.c b/newlib/libc/stdio/vfwscanf.c
|
||||
index c3470a15c..626f13723 100644
|
||||
index c3470a1..626f137 100644
|
||||
--- a/newlib/libc/stdio/vfwscanf.c
|
||||
+++ b/newlib/libc/stdio/vfwscanf.c
|
||||
@@ -74,6 +74,9 @@ PORTABILITY
|
||||
@@ -7961,7 +8135,7 @@ index c3470a15c..626f13723 100644
|
||||
#include <reent.h>
|
||||
#include <newlib.h>
|
||||
diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c
|
||||
index 920a7ea3c..ba5ee7652 100644
|
||||
index 920a7ea..ba5ee76 100644
|
||||
--- a/newlib/libc/stdlib/mbtowc_r.c
|
||||
+++ b/newlib/libc/stdlib/mbtowc_r.c
|
||||
@@ -7,6 +7,7 @@
|
||||
@@ -7974,7 +8148,7 @@ index 920a7ea3c..ba5ee7652 100644
|
||||
wchar_t *__restrict pwc,
|
||||
diff --git a/newlib/libc/sys/arm/include/machine/_types.h b/newlib/libc/sys/arm/include/machine/_types.h
|
||||
new file mode 100644
|
||||
index 000000000..40092f99f
|
||||
index 0000000..40092f9
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/sys/arm/include/machine/_types.h
|
||||
@@ -0,0 +1,19 @@
|
||||
@@ -7999,7 +8173,7 @@ index 000000000..40092f99f
|
||||
+
|
||||
diff --git a/newlib/libc/sys/arm/sys/lock.h b/newlib/libc/sys/arm/sys/lock.h
|
||||
new file mode 100644
|
||||
index 000000000..567fed56b
|
||||
index 0000000..567fed5
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/sys/arm/sys/lock.h
|
||||
@@ -0,0 +1,66 @@
|
||||
@@ -8070,7 +8244,7 @@ index 000000000..567fed56b
|
||||
+
|
||||
+#endif // __SYS_LOCK_H__
|
||||
diff --git a/newlib/libc/sys/arm/sys/param.h b/newlib/libc/sys/arm/sys/param.h
|
||||
index 5b9464cca..e8969b954 100644
|
||||
index 5b9464c..e8969b9 100644
|
||||
--- a/newlib/libc/sys/arm/sys/param.h
|
||||
+++ b/newlib/libc/sys/arm/sys/param.h
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
@@ -7,15 +7,18 @@ UNAME_R := $(shell uname -r)
|
||||
ifneq (,$(findstring Darwin,$(UNAME_S)))
|
||||
export SHELL=/bin/bash
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# path to tools
|
||||
#---------------------------------------------------------------------------------
|
||||
export PATH := $(DEVKITPRO)/devkitA64/bin:$(PATH)
|
||||
DEVKITPATH=$(shell echo "$(DEVKITPRO)" | sed -e 's/^\([a-zA-Z]\):/\/\1/')
|
||||
export PATH := $(DEVKITPATH)/tools/bin:$(DEVKITPATH)/devkitA64/bin:$(PATH)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# add portlibs path
|
||||
#---------------------------------------------------------------------------------
|
||||
export PORTLIBS_PATH := $(DEVKITPRO)/portlibs
|
||||
export PORTLIBS_PATH := $(DEVKITPATH)/portlibs
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# the prefix on the compiler executables
|
||||
|
||||
@@ -56,14 +56,16 @@ then
|
||||
--enable-threads --disable-win32-registry --disable-nls --disable-debug\
|
||||
--disable-libmudflap --disable-libssp --disable-libgomp \
|
||||
--disable-libstdcxx-pch \
|
||||
--enable-libstdcxx-time \
|
||||
--target=$target \
|
||||
--with-newlib \
|
||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
||||
--prefix=$prefix \
|
||||
--enable-lto $plugin_ld\
|
||||
--with-system-zlib \
|
||||
--with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 alpha 7" \
|
||||
--with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 release 9" \
|
||||
$CROSS_PARAMS \
|
||||
$CROSS_GCC_PARAMS \
|
||||
|| { echo "Error configuring gcc"; exit 1; }
|
||||
touch configured-gcc
|
||||
fi
|
||||
@@ -84,6 +86,11 @@ fi
|
||||
unset CFLAGS
|
||||
cd $BUILDDIR
|
||||
|
||||
OLD_CC=$CC
|
||||
OLDCXX=$CXX
|
||||
unset CC
|
||||
unset CXX
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install newlib
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -116,6 +123,9 @@ then
|
||||
touch installed-newlib
|
||||
fi
|
||||
|
||||
export CC=$OLD_CC
|
||||
export CXX=$OLD_CXX
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install the final compiler
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
7
dka64/scripts/build-libs.sh
Normal file
7
dka64/scripts/build-libs.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
export DEVKITPRO=$TOOLPATH
|
||||
|
||||
cd $BUILDDIR/libnx-$LIBNX_VER
|
||||
$MAKE || { echo "error building libnx"; exit 1; }
|
||||
$MAKE install || { echo "error installing libnx"; exit 1; }
|
||||
@@ -6,7 +6,7 @@ do
|
||||
dir=$(echo $archive | sed -e 's/\(.*\)\.tar\.bz2/\1/' )
|
||||
cd $BUILDDIR/$dir
|
||||
if [ ! -f configured ]; then
|
||||
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$prefix $CROSS_PARAMS || { echo "error configuring $archive"; exit 1; }
|
||||
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$toolsprefix $CROSS_PARAMS || { echo "error configuring $archive"; exit 1; }
|
||||
touch configured
|
||||
fi
|
||||
if [ ! -f built ]; then
|
||||
|
||||
@@ -45,6 +45,7 @@ SECTIONS
|
||||
*.twl*(.data)
|
||||
*.twl*(.data.*)
|
||||
*.twl*(.gnu.linkonce.d*)
|
||||
. = ALIGN(4);
|
||||
__arm7i_end__ = .;
|
||||
} >twl_iwram AT>twl_ewram :arm7i
|
||||
|
||||
@@ -56,6 +57,7 @@ SECTIONS
|
||||
*.twl.*(.gnu.linkonce.b*)
|
||||
*.twl.*(.bss*)
|
||||
*.twl.*(COMMON)
|
||||
. = ALIGN(4);
|
||||
__twl_bss_end__ = .;
|
||||
} >twl_iwram :NONE
|
||||
|
||||
|
||||
@@ -51,12 +51,12 @@ _start:
|
||||
sub r1, r1, r0
|
||||
bl ClearMem
|
||||
|
||||
#ifndef VRAM
|
||||
cmp r10, #1
|
||||
bne NotTWL
|
||||
ldr r1, =__dsimode @ set DSi mode flag
|
||||
strb r10, [r1]
|
||||
|
||||
#ifndef VRAM
|
||||
ldr r1, =0x02ffe1d8 @ Get ARM7i LMA from header
|
||||
ldr r1, [r1]
|
||||
ldr r2, =__arm7i_start__
|
||||
|
||||
@@ -40,7 +40,7 @@ SECTIONS
|
||||
|
||||
.text : /* ALIGN (4): */
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
*(.text .stub .text.* .twl .gnu.linkonce.t.*)
|
||||
KEEP (*(.text.*personality*))
|
||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||
*(.gnu.warning)
|
||||
@@ -139,13 +139,14 @@ SECTIONS
|
||||
__arm7_end__ = .;
|
||||
|
||||
|
||||
.bss ALIGN(4) :
|
||||
.bss ALIGN(4) (NOLOAD) :
|
||||
{
|
||||
__bss_start = ABSOLUTE(.);
|
||||
__bss_start__ = ABSOLUTE(.);
|
||||
*(.dynbss)
|
||||
*(.gnu.linkonce.b*)
|
||||
*(.bss*)
|
||||
*(.twl_bss)
|
||||
*(COMMON)
|
||||
. = ALIGN(4); /* REQUIRED. LD is flaky without it. */
|
||||
__bss_end__ = ABSOLUTE(.);
|
||||
|
||||
@@ -186,8 +186,7 @@ SECTIONS
|
||||
{
|
||||
__vectors_lma = LOADADDR(.vectors);
|
||||
__vectors_start = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
*.vectors*(.text .stub .text.*)
|
||||
KEEP(*(.vectors .vectors.*))
|
||||
. = ALIGN(4);
|
||||
__vectors_end = ABSOLUTE(.);
|
||||
} >vectors AT>ewram :vectors = 0xff
|
||||
|
||||
@@ -1,125 +0,0 @@
|
||||
diff -NBaur gcc-7.1.0/gcc/config/arm/t-arm-elf gcc-7.1.0-arm/gcc/config/arm/t-arm-elf
|
||||
--- gcc-7.1.0/gcc/config/arm/t-arm-elf 2017-01-01 12:07:43.000000000 +0000
|
||||
+++ gcc-7.1.0-arm/gcc/config/arm/t-arm-elf 2017-05-03 12:58:45.387209969 +0100
|
||||
@@ -16,11 +16,19 @@
|
||||
# along with GCC; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
-MULTILIB_OPTIONS = marm/mthumb
|
||||
-MULTILIB_DIRNAMES = arm thumb
|
||||
+MULTILIB_OPTIONS = mthumb mbig-endian march=armv6k mfloat-abi=hard
|
||||
+MULTILIB_DIRNAMES = thumb be armv6k fpu
|
||||
MULTILIB_EXCEPTIONS =
|
||||
MULTILIB_MATCHES =
|
||||
|
||||
+MULTILIB_REQUIRED = mthumb mbig-endian mthumb/mbig-endian march=armv6k/mfloat-abi=hard
|
||||
+
|
||||
+
|
||||
+MULTILIB_MATCHES += march?armv6k=mtune?mpcore
|
||||
+MULTILIB_MATCHES += march?armv6k=mcpu?mpcore
|
||||
+
|
||||
+
|
||||
+
|
||||
#MULTILIB_OPTIONS += mcpu=fa526/mcpu=fa626/mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te
|
||||
#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te
|
||||
#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
|
||||
@@ -38,9 +46,9 @@
|
||||
# Not quite true. We can support hard-vfp calling in Thumb2, but how do we
|
||||
# express that here? Also, we really need architecture v5e or later
|
||||
# (mcrr etc).
|
||||
-MULTILIB_OPTIONS += mfloat-abi=hard
|
||||
-MULTILIB_DIRNAMES += fpu
|
||||
-MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
||||
+#MULTILIB_OPTIONS += mfloat-abi=hard
|
||||
+#MULTILIB_DIRNAMES += fpu
|
||||
+#MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
||||
#MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard*
|
||||
#MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard*
|
||||
|
||||
diff -NBaur gcc-7.1.0/gcc/config/arm/unknown-elf.h gcc-7.1.0-arm/gcc/config/arm/unknown-elf.h
|
||||
--- gcc-7.1.0/gcc/config/arm/unknown-elf.h 2017-01-01 12:07:43.000000000 +0000
|
||||
+++ gcc-7.1.0-arm/gcc/config/arm/unknown-elf.h 2017-06-08 12:22:17.868509897 +0100
|
||||
@@ -29,7 +29,7 @@
|
||||
#endif
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
-#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
|
||||
+#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
@@ -93,4 +93,9 @@
|
||||
udivmoddi4, which will depend on the exception unwind routines,
|
||||
which will depend on abort, which is defined in libc. */
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
-#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
|
||||
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
|
||||
+
|
||||
+/* The system headers under devkitARM are C++-aware. */
|
||||
+#undef NO_IMPLICIT_EXTERN_C
|
||||
+#define NO_IMPLICIT_EXTERN_C
|
||||
+
|
||||
diff -NBaur gcc-7.1.0/gcc/gcc.c gcc-7.1.0-arm/gcc/gcc.c
|
||||
--- gcc-7.1.0/gcc/gcc.c 2017-01-17 09:38:48.000000000 +0000
|
||||
+++ gcc-7.1.0-arm/gcc/gcc.c 2017-05-03 12:58:45.395210596 +0100
|
||||
@@ -779,6 +779,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifndef LIBGLOSS_SPEC
|
||||
+# define LIBGLOSS_SPEC "-lsysbase"
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
|
||||
#ifndef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
@@ -1074,6 +1079,7 @@
|
||||
static const char *lib_spec = LIB_SPEC;
|
||||
static const char *link_gomp_spec = "";
|
||||
static const char *libgcc_spec = LIBGCC_SPEC;
|
||||
+static const char *libgloss_spec = LIBGLOSS_SPEC;
|
||||
static const char *endfile_spec = ENDFILE_SPEC;
|
||||
static const char *startfile_spec = STARTFILE_SPEC;
|
||||
static const char *linker_name_spec = LINKER_NAME;
|
||||
@@ -1579,6 +1585,7 @@
|
||||
INIT_STATIC_SPEC ("lib", &lib_spec),
|
||||
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
|
||||
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
|
||||
+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
|
||||
INIT_STATIC_SPEC ("startfile", &startfile_spec),
|
||||
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
|
||||
INIT_STATIC_SPEC ("version", &compiler_version),
|
||||
diff -NBaur gcc-7.1.0/libgcc/config/arm/t-bpabi gcc-7.1.0-arm/libgcc/config/arm/t-bpabi
|
||||
--- gcc-7.1.0/libgcc/config/arm/t-bpabi 2012-08-17 16:06:06.000000000 +0100
|
||||
+++ gcc-7.1.0-arm/libgcc/config/arm/t-bpabi 2017-05-03 12:58:45.395210596 +0100
|
||||
@@ -17,4 +17,4 @@
|
||||
# On ARM, specifying -fnon-call-exceptions will needlessly pull in
|
||||
# the unwinder in simple programs which use 64-bit division. Omitting
|
||||
# the option is safe.
|
||||
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
|
||||
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
|
||||
diff -NBaur gcc-7.1.0/libgcc/crtstuff.c gcc-7.1.0-arm/libgcc/crtstuff.c
|
||||
--- gcc-7.1.0/libgcc/crtstuff.c 2017-01-01 12:07:43.000000000 +0000
|
||||
+++ gcc-7.1.0-arm/libgcc/crtstuff.c 2017-05-03 12:58:45.395210596 +0100
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/* Target machine header files require this define. */
|
||||
#define IN_LIBGCC2
|
||||
-
|
||||
+#define USED_FOR_TARGET
|
||||
/* FIXME: Including auto-host is incorrect, but until we have
|
||||
identified the set of defines that need to go into auto-target.h,
|
||||
this will have to do. */
|
||||
diff -NBaur gcc-7.1.0/libgcc/Makefile.in gcc-7.1.0-arm/libgcc/Makefile.in
|
||||
--- gcc-7.1.0/libgcc/Makefile.in 2017-04-19 09:08:44.000000000 +0100
|
||||
+++ gcc-7.1.0-arm/libgcc/Makefile.in 2017-05-03 12:58:45.399210922 +0100
|
||||
@@ -844,7 +844,7 @@
|
||||
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
|
||||
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
|
||||
|
||||
-c_flags := -fexceptions
|
||||
+c_flags := -fno-exceptions
|
||||
|
||||
ifeq ($(enable_shared),yes)
|
||||
|
||||
291
dkarm-eabi/patches/gcc-8.1.0.patch
Normal file
291
dkarm-eabi/patches/gcc-8.1.0.patch
Normal file
@@ -0,0 +1,291 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/config/arm/arm-cpus.in gcc-8.1.0-arm/gcc/config/arm/arm-cpus.in
|
||||
--- gcc-8.1.0/gcc/config/arm/arm-cpus.in 2018-01-11 15:21:26.000000000 +0000
|
||||
+++ gcc-8.1.0-arm/gcc/config/arm/arm-cpus.in 2018-05-11 01:05:33.648236777 +0000
|
||||
@@ -393,7 +393,7 @@
|
||||
tune for mpcore
|
||||
tune flags CO_PROC
|
||||
base 6K
|
||||
- isa ARMv6k
|
||||
+ isa ARMv6k VFPv2 FP_DBL
|
||||
option fp add VFPv2 FP_DBL
|
||||
optalias vfpv2 fp
|
||||
option nofp remove ALL_FP
|
||||
diff -NBaur gcc-8.1.0/gcc/config/arm/t-arm-elf gcc-8.1.0-arm/gcc/config/arm/t-arm-elf
|
||||
--- gcc-8.1.0/gcc/config/arm/t-arm-elf 2018-01-11 15:21:26.000000000 +0000
|
||||
+++ gcc-8.1.0-arm/gcc/config/arm/t-arm-elf 2018-05-10 23:15:13.124566279 +0000
|
||||
@@ -1,4 +1,4 @@
|
||||
-# Copyright (C) 1998-2018 Free Software Foundation, Inc.
|
||||
+# Copyright (C) 1998-2017 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GCC.
|
||||
#
|
||||
@@ -16,110 +16,83 @@
|
||||
# along with GCC; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
-# Build a very basic set of libraries that should cater for most cases.
|
||||
-
|
||||
-# Single-precision floating-point is NOT supported; we don't build a
|
||||
-# suitable library for that. Use the rm-profile config in that case.
|
||||
-
|
||||
-# PART 1 - Useful groups of options
|
||||
-
|
||||
-dp_fpus := vfp vfpv2 vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 \
|
||||
- neon neon-vfpv3 neon-fp16 vfpv4 neon-vfpv4 vfpv4-d16 \
|
||||
- fpv5-d16 fp-armv8 neon-fp-armv8 crypto-neon-fp-armv8 \
|
||||
- vfp3
|
||||
-
|
||||
-sp_fpus := vfpv3xd vfpv3xd-fp16 fpv4-sp-d16 fpv5-sp-d16
|
||||
-
|
||||
-v7a_fps := vfpv3 vfpv3-fp16 vfpv4 simd neon-fp16 neon-vfpv4
|
||||
-v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4 neon \
|
||||
- neon-fp16 simd
|
||||
-
|
||||
-# Not all these permutations exist for all architecture variants, but
|
||||
-# it seems to work ok.
|
||||
-v8_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
|
||||
-
|
||||
-# We don't do anything special with these. Pre-v4t probably doesn't work.
|
||||
-all_early_nofp := armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t
|
||||
-
|
||||
-all_early_arch := armv5e armv5tej armv6 armv6j armv6k armv6z armv6kz \
|
||||
- armv6zk armv6t2 iwmmxt iwmmxt2
|
||||
-
|
||||
-all_v7_a_r := armv7-a armv7ve armv7-r
|
||||
-
|
||||
-all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a armv8.4-a
|
||||
-
|
||||
-# No floating point variants, require thumb1 softfp
|
||||
-all_nofp_t := armv6-m armv6s-m armv8-m.base
|
||||
-
|
||||
-all_nofp_t2 := armv7-m
|
||||
-
|
||||
-all_sp_only := armv7e-m armv8-m.main
|
||||
-
|
||||
-MULTILIB_OPTIONS =
|
||||
-MULTILIB_DIRNAMES =
|
||||
+MULTILIB_OPTIONS = mthumb mbig-endian march=armv6k mfloat-abi=hard
|
||||
+MULTILIB_DIRNAMES = thumb be armv6k fpu
|
||||
MULTILIB_EXCEPTIONS =
|
||||
MULTILIB_MATCHES =
|
||||
-MULTILIB_REUSE =
|
||||
-
|
||||
-# PART 2 - multilib build rules
|
||||
-
|
||||
-MULTILIB_OPTIONS += marm/mthumb
|
||||
-MULTILIB_DIRNAMES += arm thumb
|
||||
-
|
||||
-MULTILIB_OPTIONS += mfpu=auto
|
||||
-MULTILIB_DIRNAMES += autofp
|
||||
-
|
||||
-MULTILIB_OPTIONS += march=armv5te+fp/march=armv7+fp
|
||||
-MULTILIB_DIRNAMES += v5te v7
|
||||
-
|
||||
-MULTILIB_OPTIONS += mfloat-abi=hard
|
||||
-MULTILIB_DIRNAMES += fpu
|
||||
-
|
||||
-# Build a total of 4 library variants (base options plus the following):
|
||||
-MULTILIB_REQUIRED += mthumb
|
||||
-MULTILIB_REQUIRED += marm/mfpu=auto/march=armv5te+fp/mfloat-abi=hard
|
||||
-MULTILIB_REQUIRED += mthumb/mfpu=auto/march=armv7+fp/mfloat-abi=hard
|
||||
-
|
||||
-# PART 3 - Match rules
|
||||
-
|
||||
-# Map all supported FPUs onto mfpu=auto
|
||||
-MULTILIB_MATCHES += $(foreach FPU, $(dp_fpus), \
|
||||
- mfpu?auto=mfpu?$(FPU))
|
||||
-
|
||||
-MULTILIB_MATCHES += march?armv5te+fp=march?armv5te
|
||||
-
|
||||
-MULTILIB_MATCHES += $(foreach ARCH, $(all_early_arch), \
|
||||
- march?armv5te+fp=march?$(ARCH) \
|
||||
- march?armv5te+fp=march?$(ARCH)+fp)
|
||||
-
|
||||
-MULTILIB_MATCHES += march?armv7+fp=march?armv7
|
||||
-
|
||||
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7a_fps), \
|
||||
- march?armv7+fp=march?armv7-a+$(FPARCH))
|
||||
|
||||
-MULTILIB_MATCHES += $(foreach FPARCH, $(v7ve_fps), \
|
||||
- march?armv7+fp=march?armv7ve+$(FPARCH))
|
||||
+MULTILIB_REQUIRED = mthumb mbig-endian mthumb/mbig-endian march=armv6k/mfloat-abi=hard
|
||||
|
||||
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v7_a_r), \
|
||||
- march?armv7+fp=march?$(ARCH) \
|
||||
- march?armv7+fp=march?$(ARCH)+fp)
|
||||
|
||||
-MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \
|
||||
- march?armv7+fp=march?$(ARCH) \
|
||||
- $(foreach FPARCH, $(v8_fps), \
|
||||
- march?armv7+fp=march?$(ARCH)+$(FPARCH)))
|
||||
+MULTILIB_MATCHES += march?armv6k=mtune?mpcore
|
||||
+MULTILIB_MATCHES += march?armv6k=mcpu?mpcore
|
||||
|
||||
-MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \
|
||||
- march?armv7+fp=march?$(ARCH)+fp.dp)
|
||||
|
||||
-# PART 4 - Reuse rules
|
||||
|
||||
-MULTILIB_REUSE += mthumb=mthumb/mfpu.auto
|
||||
-MULTILIB_REUSE += mthumb=mthumb/mfpu.auto/march.armv5te+fp
|
||||
-MULTILIB_REUSE += mthumb=mthumb/march.armv5te+fp
|
||||
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=marm/march.armv5te+fp/mfloat-abi.hard
|
||||
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=march.armv5te+fp/mfloat-abi.hard
|
||||
-MULTILIB_REUSE += marm/mfpu.auto/march.armv5te+fp/mfloat-abi.hard=mfpu.auto/march.armv5te+fp/mfloat-abi.hard
|
||||
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mthumb/march.armv7+fp/mfloat-abi.hard
|
||||
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=mfpu.auto/march.armv7+fp/mfloat-abi.hard
|
||||
-MULTILIB_REUSE += mthumb/mfpu.auto/march.armv7+fp/mfloat-abi.hard=march.armv7+fp/mfloat-abi.hard
|
||||
+#MULTILIB_OPTIONS += mcpu=fa526/mcpu=fa626/mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te
|
||||
+#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te
|
||||
+#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
|
||||
+
|
||||
+#MULTILIB_OPTIONS += march=armv7
|
||||
+#MULTILIB_DIRNAMES += thumb2
|
||||
+#MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
|
||||
+#MULTILIB_MATCHES += march?armv7=march?armv7-a
|
||||
+#MULTILIB_MATCHES += march?armv7=march?armv7-r
|
||||
+#MULTILIB_MATCHES += march?armv7=march?armv7-m
|
||||
+#MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
|
||||
+#MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
|
||||
+#MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
|
||||
+
|
||||
+# Not quite true. We can support hard-vfp calling in Thumb2, but how do we
|
||||
+# express that here? Also, we really need architecture v5e or later
|
||||
+# (mcrr etc).
|
||||
+#MULTILIB_OPTIONS += mfloat-abi=hard
|
||||
+#MULTILIB_DIRNAMES += fpu
|
||||
+#MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
||||
+#MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard*
|
||||
+#MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard*
|
||||
+
|
||||
+# MULTILIB_OPTIONS += mcpu=ep9312
|
||||
+# MULTILIB_DIRNAMES += ep9312
|
||||
+# MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312*
|
||||
+#
|
||||
+# MULTILIB_OPTIONS += mlittle-endian/mbig-endian
|
||||
+# MULTILIB_DIRNAMES += le be
|
||||
+# MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
|
||||
+#
|
||||
+# MULTILIB_OPTIONS += mfloat-abi=hard/mfloat-abi=soft
|
||||
+# MULTILIB_DIRNAMES += fpu soft
|
||||
+# MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
|
||||
+#
|
||||
+# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
|
||||
+# MULTILIB_DIRNAMES += normal interwork
|
||||
+#
|
||||
+# MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore
|
||||
+# MULTILIB_DIRNAMES += elf under
|
||||
+#
|
||||
+# MULTILIB_OPTIONS += mcpu=arm7
|
||||
+# MULTILIB_DIRNAMES += nofmult
|
||||
+# MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=arm7*
|
||||
+# # Note: the multilib_exceptions matches both -mthumb and
|
||||
+# # -mthumb-interwork
|
||||
+# #
|
||||
+# # We have to match all the arm cpu variants which do not have the
|
||||
+# # multiply instruction and treat them as if the user had specified
|
||||
+# # -mcpu=arm7. Note that in the following the ? is interpreted as
|
||||
+# # an = for the purposes of matching command line options.
|
||||
+# # FIXME: There ought to be a better way to do this.
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7d
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7di
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm70
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm700
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm700i
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm710
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm710c
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7100
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7500
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm7500fe
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm6
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm60
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm600
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm610
|
||||
+# MULTILIB_MATCHES += mcpu?arm7=mcpu?arm620
|
||||
diff -NBaur gcc-8.1.0/gcc/config/arm/unknown-elf.h gcc-8.1.0-arm/gcc/config/arm/unknown-elf.h
|
||||
--- gcc-8.1.0/gcc/config/arm/unknown-elf.h 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-arm/gcc/config/arm/unknown-elf.h 2018-05-10 23:01:02.432676190 +0000
|
||||
@@ -29,7 +29,7 @@
|
||||
#endif
|
||||
|
||||
/* Now we define the strings used to build the spec file. */
|
||||
-#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
|
||||
+#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
@@ -93,4 +93,9 @@
|
||||
udivmoddi4, which will depend on the exception unwind routines,
|
||||
which will depend on abort, which is defined in libc. */
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
-#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
|
||||
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
|
||||
+
|
||||
+/* The system headers under devkitARM are C++-aware. */
|
||||
+#undef NO_IMPLICIT_EXTERN_C
|
||||
+#define NO_IMPLICIT_EXTERN_C
|
||||
+
|
||||
diff -NBaur gcc-8.1.0/gcc/gcc.c gcc-8.1.0-arm/gcc/gcc.c
|
||||
--- gcc-8.1.0/gcc/gcc.c 2018-02-09 06:44:06.000000000 +0000
|
||||
+++ gcc-8.1.0-arm/gcc/gcc.c 2018-05-10 23:01:02.440676328 +0000
|
||||
@@ -786,6 +786,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#ifndef LIBGLOSS_SPEC
|
||||
+# define LIBGLOSS_SPEC "-lsysbase"
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
|
||||
#ifndef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
@@ -1081,6 +1086,7 @@
|
||||
static const char *lib_spec = LIB_SPEC;
|
||||
static const char *link_gomp_spec = "";
|
||||
static const char *libgcc_spec = LIBGCC_SPEC;
|
||||
+static const char *libgloss_spec = LIBGLOSS_SPEC;
|
||||
static const char *endfile_spec = ENDFILE_SPEC;
|
||||
static const char *startfile_spec = STARTFILE_SPEC;
|
||||
static const char *linker_name_spec = LINKER_NAME;
|
||||
@@ -1577,6 +1583,7 @@
|
||||
INIT_STATIC_SPEC ("lib", &lib_spec),
|
||||
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
|
||||
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
|
||||
+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
|
||||
INIT_STATIC_SPEC ("startfile", &startfile_spec),
|
||||
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
|
||||
INIT_STATIC_SPEC ("version", &compiler_version),
|
||||
diff -NBaur gcc-8.1.0/libgcc/config/arm/t-bpabi gcc-8.1.0-arm/libgcc/config/arm/t-bpabi
|
||||
--- gcc-8.1.0/libgcc/config/arm/t-bpabi 2012-08-17 15:06:06.000000000 +0000
|
||||
+++ gcc-8.1.0-arm/libgcc/config/arm/t-bpabi 2018-05-10 23:01:02.440676328 +0000
|
||||
@@ -17,4 +17,4 @@
|
||||
# On ARM, specifying -fnon-call-exceptions will needlessly pull in
|
||||
# the unwinder in simple programs which use 64-bit division. Omitting
|
||||
# the option is safe.
|
||||
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
|
||||
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
|
||||
diff -NBaur gcc-8.1.0/libgcc/crtstuff.c gcc-8.1.0-arm/libgcc/crtstuff.c
|
||||
--- gcc-8.1.0/libgcc/crtstuff.c 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-arm/libgcc/crtstuff.c 2018-05-10 23:01:02.440676328 +0000
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/* Target machine header files require this define. */
|
||||
#define IN_LIBGCC2
|
||||
-
|
||||
+#define USED_FOR_TARGET
|
||||
/* FIXME: Including auto-host is incorrect, but until we have
|
||||
identified the set of defines that need to go into auto-target.h,
|
||||
this will have to do. */
|
||||
diff -NBaur gcc-8.1.0/libgcc/Makefile.in gcc-8.1.0-arm/libgcc/Makefile.in
|
||||
--- gcc-8.1.0/libgcc/Makefile.in 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-arm/libgcc/Makefile.in 2018-05-10 23:01:02.440676328 +0000
|
||||
@@ -847,7 +847,7 @@
|
||||
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
|
||||
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
|
||||
|
||||
-c_flags := -fexceptions
|
||||
+c_flags := -fno-exceptions
|
||||
|
||||
ifeq ($(enable_shared),yes)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,9 @@ endif
|
||||
|
||||
include $(DEVKITARM)/base_rules
|
||||
|
||||
PORTLIBS := $(PORTLIBS_PATH)/armv6k $(PORTLIBS_PATH)/3ds
|
||||
PORTLIBS := $(PORTLIBS_PATH)/3ds
|
||||
|
||||
export PATH := $(PORTLIBS_PATH)/3ds/bin:$(PATH)
|
||||
|
||||
CTRULIB ?= $(DEVKITPRO)/libctru
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ endif
|
||||
#---------------------------------------------------------------------------------
|
||||
# path to tools
|
||||
#---------------------------------------------------------------------------------
|
||||
export PATH := $(DEVKITARM)/bin:$(PATH)
|
||||
DEVKITPATH=$(shell echo "$(DEVKITPRO)" | sed -e 's/^\([a-zA-Z]\):/\/\1/')
|
||||
export PATH := $(DEVKITPATH)/tools/bin:$(DEVKITPATH)/devkitARM/bin:$(PATH)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# the prefix on the compiler executables
|
||||
|
||||
@@ -60,10 +60,11 @@ then
|
||||
--with-newlib \
|
||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
||||
--prefix=$prefix \
|
||||
--enable-lto $plugin_ld\
|
||||
--enable-lto\
|
||||
--with-system-zlib \
|
||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 47" \
|
||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 48" \
|
||||
$CROSS_PARAMS \
|
||||
$CROSS_GCC_PARAMS \
|
||||
|| { echo "Error configuring gcc"; exit 1; }
|
||||
touch configured-gcc
|
||||
fi
|
||||
@@ -84,6 +85,11 @@ fi
|
||||
unset CFLAGS
|
||||
cd $BUILDDIR
|
||||
|
||||
OLD_CC=$CC
|
||||
OLDCXX=$CXX
|
||||
unset CC
|
||||
unset CXX
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install newlib
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -116,6 +122,9 @@ then
|
||||
touch installed-newlib
|
||||
fi
|
||||
|
||||
export CC=$OLD_CC
|
||||
export CXX=$OLD_CXX
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install the final compiler
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -140,6 +149,39 @@ rm -fr $prefix/$target/sys-include
|
||||
|
||||
cd $BUILDDIR
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# copy base rulesets
|
||||
#---------------------------------------------------------------------------------
|
||||
cp -v $BUILDSCRIPTDIR/dkarm-eabi/rules/* $prefix
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# set env variables
|
||||
#---------------------------------------------------------------------------------
|
||||
export DEVKITPRO=$TOOLPATH
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Install and build the crt0 files
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
cp -v $BUILDSCRIPTDIR/dkarm-eabi/crtls/* $prefix/$target/lib/
|
||||
cd $prefix/$target/lib/
|
||||
|
||||
|
||||
$MAKE CRT=gba
|
||||
$MAKE CRT=gp32
|
||||
$MAKE CRT=er
|
||||
$MAKE CRT=gp32_gpsdk
|
||||
$MAKE CRT=ds_arm7
|
||||
$MAKE CRT=ds_arm9
|
||||
$MAKE CRT=ds_cart
|
||||
$MAKE ds_arm7_vram_crt0
|
||||
$MAKE 3dsx_crt0
|
||||
|
||||
cd $BUILDDIR
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install the debugger
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
@@ -3,27 +3,6 @@
|
||||
export DEVKITPRO=$TOOLPATH
|
||||
export DEVKITARM=$DEVKITPRO/devkitARM
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# copy base rulesets
|
||||
#---------------------------------------------------------------------------------
|
||||
cp -v $BUILDSCRIPTDIR/dkarm-eabi/rules/* $prefix
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Install and build the gba crt
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
cp -v $BUILDSCRIPTDIR/dkarm-eabi/crtls/* $prefix/$target/lib/
|
||||
cd $prefix/$target/lib/
|
||||
$MAKE CRT=gba
|
||||
$MAKE CRT=gp32
|
||||
$MAKE CRT=er
|
||||
$MAKE CRT=gp32_gpsdk
|
||||
$MAKE CRT=ds_arm7
|
||||
$MAKE CRT=ds_arm9
|
||||
$MAKE CRT=ds_cart
|
||||
$MAKE ds_arm7_vram_crt0
|
||||
$MAKE 3dsx_crt0
|
||||
|
||||
cd $BUILDDIR/libgba-$LIBGBA_VER
|
||||
$MAKE || { echo "error building libgba"; exit 1; }
|
||||
$MAKE install || { echo "error installing libgba"; exit 1; }
|
||||
@@ -6,7 +6,7 @@ do
|
||||
dir=$(echo $archive | sed -e 's/\(.*\)\.tar\.bz2/\1/' )
|
||||
cd $BUILDDIR/$dir
|
||||
if [ ! -f configured ]; then
|
||||
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$prefix --disable-dependency-tracking $CROSS_PARAMS || { echo "error configuring $archive"; exit 1; }
|
||||
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$toolsprefix $CROSS_PARAMS || { echo "error configuring $archive"; exit 1; }
|
||||
touch configured
|
||||
fi
|
||||
if [ ! -f built ]; then
|
||||
|
||||
@@ -1,330 +0,0 @@
|
||||
diff -NBaur gcc-6.1.0/gcc/config/rs6000/rs6000.h gcc-6.1.0-ppc/gcc/config/rs6000/rs6000.h
|
||||
--- gcc-6.1.0/gcc/config/rs6000/rs6000.h 2016-01-20 20:30:24.000000000 +0000
|
||||
+++ gcc-6.1.0-ppc/gcc/config/rs6000/rs6000.h 2016-05-20 12:10:24.645019640 +0100
|
||||
@@ -205,6 +205,7 @@
|
||||
{ "asm_cpu_476", ASM_CPU_476_SPEC }, \
|
||||
SUBTARGET_EXTRA_SPECS
|
||||
|
||||
+#if 0
|
||||
/* -mcpu=native handling only makes sense with compiler running on
|
||||
an PowerPC chip. If changing this condition, also change
|
||||
the condition in driver-rs6000.c. */
|
||||
@@ -219,6 +220,8 @@
|
||||
#else
|
||||
#define ASM_CPU_NATIVE_SPEC "%(asm_default)"
|
||||
#endif
|
||||
+#endif
|
||||
+#define ASM_CPU_NATIVE_SPEC "%(asm_default)"
|
||||
|
||||
#ifndef CC1_CPU_SPEC
|
||||
#ifdef HAVE_LOCAL_CPU_DETECT
|
||||
diff -NBaur gcc-6.1.0/gcc/config/rs6000/sysv4.h gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-6.1.0/gcc/config/rs6000/sysv4.h 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.h 2016-05-20 12:12:27.073019640 +0100
|
||||
@@ -559,7 +559,12 @@
|
||||
|
||||
/* Default starting address if specified. */
|
||||
#define LINK_START_SPEC "\
|
||||
-%{mads : %(link_start_ads) ; \
|
||||
+%{mgcn|mogc : %(link_start_ogc) ; \
|
||||
+ mvgc : %(link_start_vgc) ; \
|
||||
+ mgcbios : %(link_start_gcb) ; \
|
||||
+ mrvl : %(link_start_rvl) ; \
|
||||
+ mwup : %(link_start_wup) ; \
|
||||
+ mads : %(link_start_ads) ; \
|
||||
myellowknife : %(link_start_yellowknife) ; \
|
||||
mmvme : %(link_start_mvme) ; \
|
||||
msim : %(link_start_sim) ; \
|
||||
@@ -590,7 +594,9 @@
|
||||
|
||||
/* Any specific OS flags. */
|
||||
#define LINK_OS_SPEC "\
|
||||
-%{mads : %(link_os_ads) ; \
|
||||
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(link_os_ogc) ; \
|
||||
+ mwup : %(link_os_wup) ; \
|
||||
+ mads : %(link_os_ads) ; \
|
||||
myellowknife : %(link_os_yellowknife) ; \
|
||||
mmvme : %(link_os_mvme) ; \
|
||||
msim : %(link_os_sim) ; \
|
||||
@@ -608,7 +613,11 @@
|
||||
/* Override rs6000.h definition. */
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
|
||||
-%{mads : %(cpp_os_ads) ; \
|
||||
+%{mgcn : %(cpp_os_gcn) ; \
|
||||
+ mogc|mvgc|mgcbios : %(cpp_os_ogc) ; \
|
||||
+ mrvl : %(cpp_os_rvl) ; \
|
||||
+ mwup : %(cpp_os_wup) ; \
|
||||
+ mads : %(cpp_os_ads) ; \
|
||||
myellowknife : %(cpp_os_yellowknife) ; \
|
||||
mmvme : %(cpp_os_mvme) ; \
|
||||
msim : %(cpp_os_sim) ; \
|
||||
@@ -622,7 +630,11 @@
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "\
|
||||
-%{mads : %(startfile_ads) ; \
|
||||
+%{mgcn : %(startfile_gcn) ; \
|
||||
+ mogc|mvgc|mgcbios : %(startfile_ogc) ; \
|
||||
+ mrvl : %(startfile_ogc) ; \
|
||||
+ mwup : %(startfile_wup) ; \
|
||||
+ mads : %(startfile_ads) ; \
|
||||
myellowknife : %(startfile_yellowknife) ; \
|
||||
mmvme : %(startfile_mvme) ; \
|
||||
msim : %(startfile_sim) ; \
|
||||
@@ -632,11 +643,13 @@
|
||||
mcall-openbsd: %(startfile_openbsd) ; \
|
||||
: %(startfile_default) }"
|
||||
|
||||
-#define STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s"
|
||||
+#define STARTFILE_DEFAULT_SPEC "crt0.o%s ecrti.o%s crtbegin.o%s"
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "\
|
||||
-%{mads : %(lib_ads) ; \
|
||||
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(lib_ogc) ; \
|
||||
+ mwup : %(lib_wup) ; \
|
||||
+ mads : %(lib_ads) ; \
|
||||
myellowknife : %(lib_yellowknife) ; \
|
||||
mmvme : %(lib_mvme) ; \
|
||||
msim : %(lib_sim) ; \
|
||||
@@ -646,11 +658,13 @@
|
||||
mcall-openbsd: %(lib_openbsd) ; \
|
||||
: %(lib_default) }"
|
||||
|
||||
-#define LIB_DEFAULT_SPEC "-lc"
|
||||
+#define LIB_DEFAULT_SPEC "--start-group -lsysbase -lc --end-group"
|
||||
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "\
|
||||
-%{mads : %(endfile_ads) ; \
|
||||
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(endfile_ogc) ; \
|
||||
+ mwup : %(endfile_wup) ; \
|
||||
+ mads : %(endfile_ads) ; \
|
||||
myellowknife : %(endfile_yellowknife) ; \
|
||||
mmvme : %(endfile_mvme) ; \
|
||||
msim : %(endfile_sim) ; \
|
||||
@@ -666,16 +679,33 @@
|
||||
|
||||
/* Motorola ADS support. */
|
||||
#define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
|
||||
+#define LIB_OGC_SPEC "--start-group -lsysbase -lc --end-group"
|
||||
+#define LIB_WUP_SPEC "--start-group -lsysbase -lc --end-group"
|
||||
|
||||
#define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
|
||||
+#define STARTFILE_OGC_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s"
|
||||
+#define STARTFILE_WUP_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s"
|
||||
|
||||
#define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
|
||||
+#define ENDFILE_OGC_SPEC "crtend.o%s ecrtn.o%s"
|
||||
+#define ENDFILE_WUP_SPEC "crtend.o%s ecrtn.o%s"
|
||||
|
||||
#define LINK_START_ADS_SPEC "-T ads.ld%s"
|
||||
+#define LINK_START_OGC_SPEC "-T ogc.ld%s"
|
||||
+#define LINK_START_RVL_SPEC "-T rvl.ld%s"
|
||||
+#define LINK_START_WUP_SPEC "-T wup.ld%s"
|
||||
+#define LINK_START_VGC_SPEC "-T vgcogc.ld%s"
|
||||
+#define LINK_START_GCB_SPEC "-T gcbogc.ld%s"
|
||||
|
||||
#define LINK_OS_ADS_SPEC ""
|
||||
+#define LINK_OS_OGC_SPEC "--gc-sections"
|
||||
+#define LINK_OS_WUP_SPEC "--gc-sections"
|
||||
|
||||
#define CPP_OS_ADS_SPEC ""
|
||||
+#define CPP_OS_GCN_SPEC "-D__gamecube__ -ffunction-sections -fdata-sections"
|
||||
+#define CPP_OS_OGC_SPEC "-D__gamecube__ -DHW_DOL -ffunction-sections -fdata-sections"
|
||||
+#define CPP_OS_RVL_SPEC "-D__wii__ -DHW_RVL -ffunction-sections -fdata-sections"
|
||||
+#define CPP_OS_WUP_SPEC "-D__wiiu__ -DHW_WUP -ffunction-sections -fdata-sections"
|
||||
|
||||
/* Motorola Yellowknife support. */
|
||||
#define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
|
||||
@@ -855,6 +879,8 @@
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
|
||||
+ { "lib_ogc", LIB_OGC_SPEC }, \
|
||||
+ { "lib_wup", LIB_WUP_SPEC }, \
|
||||
{ "lib_ads", LIB_ADS_SPEC }, \
|
||||
{ "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
|
||||
{ "lib_mvme", LIB_MVME_SPEC }, \
|
||||
@@ -864,6 +889,8 @@
|
||||
{ "lib_netbsd", LIB_NETBSD_SPEC }, \
|
||||
{ "lib_openbsd", LIB_OPENBSD_SPEC }, \
|
||||
{ "lib_default", LIB_DEFAULT_SPEC }, \
|
||||
+ { "startfile_ogc", STARTFILE_OGC_SPEC }, \
|
||||
+ { "startfile_wup", STARTFILE_WUP_SPEC }, \
|
||||
{ "startfile_ads", STARTFILE_ADS_SPEC }, \
|
||||
{ "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
|
||||
{ "startfile_mvme", STARTFILE_MVME_SPEC }, \
|
||||
@@ -873,6 +899,8 @@
|
||||
{ "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
|
||||
{ "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
|
||||
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
|
||||
+ { "endfile_ogc", ENDFILE_OGC_SPEC }, \
|
||||
+ { "endfile_wup", ENDFILE_WUP_SPEC }, \
|
||||
{ "endfile_ads", ENDFILE_ADS_SPEC }, \
|
||||
{ "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
|
||||
{ "endfile_mvme", ENDFILE_MVME_SPEC }, \
|
||||
@@ -884,7 +911,12 @@
|
||||
{ "endfile_default", ENDFILE_DEFAULT_SPEC }, \
|
||||
{ "link_shlib", LINK_SHLIB_SPEC }, \
|
||||
{ "link_start", LINK_START_SPEC }, \
|
||||
+ { "link_start_vgc", LINK_START_VGC_SPEC }, \
|
||||
+ { "link_start_gcb", LINK_START_GCB_SPEC }, \
|
||||
+ { "link_start_rvl", LINK_START_RVL_SPEC }, \
|
||||
+ { "link_start_wup", LINK_START_WUP_SPEC }, \
|
||||
{ "link_start_ads", LINK_START_ADS_SPEC }, \
|
||||
+ { "link_start_ogc", LINK_START_OGC_SPEC }, \
|
||||
{ "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
|
||||
{ "link_start_mvme", LINK_START_MVME_SPEC }, \
|
||||
{ "link_start_sim", LINK_START_SIM_SPEC }, \
|
||||
@@ -894,6 +925,8 @@
|
||||
{ "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
|
||||
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \
|
||||
{ "link_os", LINK_OS_SPEC }, \
|
||||
+ { "link_os_ogc", LINK_OS_OGC_SPEC }, \
|
||||
+ { "link_os_wup", LINK_OS_WUP_SPEC }, \
|
||||
{ "link_os_ads", LINK_OS_ADS_SPEC }, \
|
||||
{ "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "link_os_mvme", LINK_OS_MVME_SPEC }, \
|
||||
@@ -905,6 +937,10 @@
|
||||
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \
|
||||
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
|
||||
{ "link_secure_plt", LINK_SECURE_PLT_SPEC }, \
|
||||
+ { "cpp_os_gcn", CPP_OS_GCN_SPEC }, \
|
||||
+ { "cpp_os_ogc", CPP_OS_OGC_SPEC }, \
|
||||
+ { "cpp_os_rvl", CPP_OS_RVL_SPEC }, \
|
||||
+ { "cpp_os_wup", CPP_OS_WUP_SPEC }, \
|
||||
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
||||
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
||||
diff -NBaur gcc-6.1.0/gcc/config/rs6000/sysv4.opt gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.opt
|
||||
--- gcc-6.1.0/gcc/config/rs6000/sysv4.opt 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.opt 2016-05-20 12:10:24.649019640 +0100
|
||||
@@ -120,6 +120,30 @@
|
||||
Target RejectNegative
|
||||
Link with libads.a, libc.a and crt0.o.
|
||||
|
||||
+mgcn
|
||||
+Target RejectNegative
|
||||
+Link with libsysbase.a and libc.a, use ogc linker script
|
||||
+
|
||||
+mogc
|
||||
+Target RejectNegative
|
||||
+Link with libsysbase.a and libc.a, use ogc linker script
|
||||
+
|
||||
+mgcbios
|
||||
+Target RejectNegative
|
||||
+Link with libsysbase.a and libc.a, use gcbogc linker script
|
||||
+
|
||||
+mvgc
|
||||
+Target RejectNegative
|
||||
+Link with libsysbase.a and libc.a, use gcbogc linker script
|
||||
+
|
||||
+mrvl
|
||||
+Target RejectNegative
|
||||
+Link with libsysbase.a and libc.a, use rvl linker script
|
||||
+
|
||||
+mwup
|
||||
+Target RejectNegative
|
||||
+Link with libsysbase.a and libc.a, use wup linker script
|
||||
+
|
||||
myellowknife
|
||||
Target RejectNegative
|
||||
Link with libyk.a, libc.a and crt0.o.
|
||||
diff -NBaur gcc-6.1.0/gcc/config.gcc gcc-6.1.0-ppc/gcc/config.gcc
|
||||
--- gcc-6.1.0/gcc/config.gcc 2016-04-11 11:14:59.000000000 +0100
|
||||
+++ gcc-6.1.0-ppc/gcc/config.gcc 2016-05-20 12:10:24.661019640 +0100
|
||||
@@ -2381,7 +2381,7 @@
|
||||
use_gcc_stdint=wrap
|
||||
;;
|
||||
powerpc-*-eabi*)
|
||||
- tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/750cl.h"
|
||||
extra_options="${extra_options} rs6000/sysv4.opt"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
|
||||
use_gcc_stdint=wrap
|
||||
diff -NBaur gcc-6.1.0/gcc/Makefile.in gcc-6.1.0-ppc/gcc/Makefile.in
|
||||
--- gcc-6.1.0/gcc/Makefile.in 2016-04-15 12:49:39.000000000 +0100
|
||||
+++ gcc-6.1.0-ppc/gcc/Makefile.in 2016-05-20 12:10:24.641019640 +0100
|
||||
@@ -1073,8 +1073,8 @@
|
||||
# things like the go/%.o rule work properly; but we use $(*F) for the
|
||||
# file part, as we just want the file part of the stem, not the entire
|
||||
# file name.
|
||||
-COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo
|
||||
-POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
|
||||
+COMPILE = $(COMPILE.base)
|
||||
+POSTCOMPILE =
|
||||
else
|
||||
COMPILE = source='$<' object='$@' libtool=no \
|
||||
DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) $(COMPILE.base)
|
||||
diff -NBaur gcc-6.1.0/libcpp/Makefile.in gcc-6.1.0-ppc/libcpp/Makefile.in
|
||||
--- gcc-6.1.0/libcpp/Makefile.in 2016-04-27 09:22:11.000000000 +0100
|
||||
+++ gcc-6.1.0-ppc/libcpp/Makefile.in 2016-05-20 12:10:24.661019640 +0100
|
||||
@@ -208,8 +208,7 @@
|
||||
# Note that we put the dependencies into a .Tpo file, then move them
|
||||
# into place if the compile succeeds. We need this because gcc does
|
||||
# not atomically write the dependency output file.
|
||||
-COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
|
||||
-POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
+COMPILE = $(COMPILE.base) -o $@
|
||||
else
|
||||
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
|
||||
$(depcomp) $(COMPILE.base)
|
||||
diff -NBaur gcc-6.1.0/libgcc/config/rs6000/crtrestvr.S gcc-6.1.0-ppc/libgcc/config/rs6000/crtrestvr.S
|
||||
--- gcc-6.1.0/libgcc/config/rs6000/crtrestvr.S 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.1.0-ppc/libgcc/config/rs6000/crtrestvr.S 2016-05-20 12:10:24.665019640 +0100
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* On PowerPC64 Linux, these functions are provided by the linker. */
|
||||
#ifndef __powerpc64__
|
||||
-
|
||||
+#if 0
|
||||
#undef __ALTIVEC__
|
||||
#define __ALTIVEC__ 1
|
||||
#include "ppc-asm.h"
|
||||
@@ -85,3 +85,4 @@
|
||||
CFI_ENDPROC
|
||||
|
||||
#endif
|
||||
+#endif
|
||||
diff -NBaur gcc-6.1.0/libgcc/config/rs6000/crtsavevr.S gcc-6.1.0-ppc/libgcc/config/rs6000/crtsavevr.S
|
||||
--- gcc-6.1.0/libgcc/config/rs6000/crtsavevr.S 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.1.0-ppc/libgcc/config/rs6000/crtsavevr.S 2016-05-20 12:10:24.665019640 +0100
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* On PowerPC64 Linux, these functions are provided by the linker. */
|
||||
#ifndef __powerpc64__
|
||||
-
|
||||
+#if 0
|
||||
#undef __ALTIVEC__
|
||||
#define __ALTIVEC__ 1
|
||||
#include "ppc-asm.h"
|
||||
@@ -85,3 +85,4 @@
|
||||
CFI_ENDPROC
|
||||
|
||||
#endif
|
||||
+#endif
|
||||
diff -NBaur gcc-6.1.0/libgcc/crtstuff.c gcc-6.1.0-ppc/libgcc/crtstuff.c
|
||||
--- gcc-6.1.0/libgcc/crtstuff.c 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.1.0-ppc/libgcc/crtstuff.c 2016-05-20 12:10:24.669019640 +0100
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
/* Target machine header files require this define. */
|
||||
#define IN_LIBGCC2
|
||||
+#define USED_FOR_TARGET
|
||||
|
||||
/* FIXME: Including auto-host is incorrect, but until we have
|
||||
identified the set of defines that need to go into auto-target.h,
|
||||
diff -NBaur gcc-6.1.0/libstdc++-v3/include/std/type_traits gcc-6.1.0-ppc/libstdc++-v3/include/std/type_traits
|
||||
--- gcc-6.1.0/libstdc++-v3/include/std/type_traits 2016-01-12 21:19:58.000000000 +0000
|
||||
+++ gcc-6.1.0-ppc/libstdc++-v3/include/std/type_traits 2016-05-20 12:10:24.669019640 +0100
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <bits/c++config.h>
|
||||
|
||||
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
-# if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__)
|
||||
+# if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__) && 0
|
||||
namespace std
|
||||
{
|
||||
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -NBaur gcc-6.3.0/gcc/config/rs6000/rs6000.h gcc-6.3.0-ppc/gcc/config/rs6000/rs6000.h
|
||||
--- gcc-6.3.0/gcc/config/rs6000/rs6000.h 2016-07-07 20:42:07.000000000 +0100
|
||||
+++ gcc-6.3.0-ppc/gcc/config/rs6000/rs6000.h 2017-01-05 02:42:41.980000000 +0000
|
||||
diff -NBaur gcc-8.1.0/gcc/config/rs6000/rs6000.h gcc-8.1.0-ppc/gcc/config/rs6000/rs6000.h
|
||||
--- gcc-8.1.0/gcc/config/rs6000/rs6000.h 2018-04-10 18:59:52.000000000 +0100
|
||||
+++ gcc-8.1.0-ppc/gcc/config/rs6000/rs6000.h 2018-05-14 03:54:39.523821687 +0100
|
||||
@@ -205,6 +205,7 @@
|
||||
{ "asm_cpu_476", ASM_CPU_476_SPEC }, \
|
||||
SUBTARGET_EXTRA_SPECS
|
||||
@@ -18,10 +18,10 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/rs6000.h gcc-6.3.0-ppc/gcc/config/rs6000
|
||||
|
||||
#ifndef CC1_CPU_SPEC
|
||||
#ifdef HAVE_LOCAL_CPU_DETECT
|
||||
diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-6.3.0/gcc/config/rs6000/sysv4.h 2016-05-16 14:47:47.000000000 +0100
|
||||
+++ gcc-6.3.0-ppc/gcc/config/rs6000/sysv4.h 2017-01-05 02:46:27.020000000 +0000
|
||||
@@ -559,7 +559,12 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/config/rs6000/sysv4.h gcc-8.1.0-ppc/gcc/config/rs6000/sysv4.h
|
||||
--- gcc-8.1.0/gcc/config/rs6000/sysv4.h 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-ppc/gcc/config/rs6000/sysv4.h 2018-05-14 03:54:39.539914747 +0100
|
||||
@@ -565,7 +565,12 @@
|
||||
|
||||
/* Default starting address if specified. */
|
||||
#define LINK_START_SPEC "\
|
||||
@@ -35,7 +35,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
myellowknife : %(link_start_yellowknife) ; \
|
||||
mmvme : %(link_start_mvme) ; \
|
||||
msim : %(link_start_sim) ; \
|
||||
@@ -590,7 +595,9 @@
|
||||
@@ -596,7 +601,9 @@
|
||||
|
||||
/* Any specific OS flags. */
|
||||
#define LINK_OS_SPEC "\
|
||||
@@ -46,7 +46,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
myellowknife : %(link_os_yellowknife) ; \
|
||||
mmvme : %(link_os_mvme) ; \
|
||||
msim : %(link_os_sim) ; \
|
||||
@@ -608,7 +615,11 @@
|
||||
@@ -614,7 +621,11 @@
|
||||
/* Override rs6000.h definition. */
|
||||
#undef CPP_SPEC
|
||||
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
|
||||
@@ -59,7 +59,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
myellowknife : %(cpp_os_yellowknife) ; \
|
||||
mmvme : %(cpp_os_mvme) ; \
|
||||
msim : %(cpp_os_sim) ; \
|
||||
@@ -622,7 +633,11 @@
|
||||
@@ -628,7 +639,11 @@
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC "\
|
||||
@@ -72,7 +72,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
myellowknife : %(startfile_yellowknife) ; \
|
||||
mmvme : %(startfile_mvme) ; \
|
||||
msim : %(startfile_sim) ; \
|
||||
@@ -636,7 +651,9 @@
|
||||
@@ -642,7 +657,9 @@
|
||||
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC "\
|
||||
@@ -83,7 +83,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
myellowknife : %(lib_yellowknife) ; \
|
||||
mmvme : %(lib_mvme) ; \
|
||||
msim : %(lib_sim) ; \
|
||||
@@ -646,11 +663,13 @@
|
||||
@@ -652,11 +669,13 @@
|
||||
mcall-openbsd: %(lib_openbsd) ; \
|
||||
: %(lib_default) }"
|
||||
|
||||
@@ -99,7 +99,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
myellowknife : %(endfile_yellowknife) ; \
|
||||
mmvme : %(endfile_mvme) ; \
|
||||
msim : %(endfile_sim) ; \
|
||||
@@ -666,16 +685,33 @@
|
||||
@@ -672,16 +691,33 @@
|
||||
|
||||
/* Motorola ADS support. */
|
||||
#define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
|
||||
@@ -133,7 +133,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
|
||||
/* Motorola Yellowknife support. */
|
||||
#define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
|
||||
@@ -866,6 +902,8 @@
|
||||
@@ -882,6 +918,8 @@
|
||||
#undef SUBTARGET_EXTRA_SPECS
|
||||
#define SUBTARGET_EXTRA_SPECS \
|
||||
{ "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
|
||||
@@ -142,7 +142,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
{ "lib_ads", LIB_ADS_SPEC }, \
|
||||
{ "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
|
||||
{ "lib_mvme", LIB_MVME_SPEC }, \
|
||||
@@ -875,6 +913,8 @@
|
||||
@@ -891,6 +929,8 @@
|
||||
{ "lib_netbsd", LIB_NETBSD_SPEC }, \
|
||||
{ "lib_openbsd", LIB_OPENBSD_SPEC }, \
|
||||
{ "lib_default", LIB_DEFAULT_SPEC }, \
|
||||
@@ -151,7 +151,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
{ "startfile_ads", STARTFILE_ADS_SPEC }, \
|
||||
{ "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
|
||||
{ "startfile_mvme", STARTFILE_MVME_SPEC }, \
|
||||
@@ -884,6 +924,8 @@
|
||||
@@ -900,6 +940,8 @@
|
||||
{ "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
|
||||
{ "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
|
||||
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
|
||||
@@ -160,7 +160,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
{ "endfile_ads", ENDFILE_ADS_SPEC }, \
|
||||
{ "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
|
||||
{ "endfile_mvme", ENDFILE_MVME_SPEC }, \
|
||||
@@ -895,7 +937,12 @@
|
||||
@@ -911,7 +953,12 @@
|
||||
{ "endfile_default", ENDFILE_DEFAULT_SPEC }, \
|
||||
{ "link_shlib", LINK_SHLIB_SPEC }, \
|
||||
{ "link_start", LINK_START_SPEC }, \
|
||||
@@ -173,7 +173,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
{ "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
|
||||
{ "link_start_mvme", LINK_START_MVME_SPEC }, \
|
||||
{ "link_start_sim", LINK_START_SIM_SPEC }, \
|
||||
@@ -905,6 +952,8 @@
|
||||
@@ -921,6 +968,8 @@
|
||||
{ "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
|
||||
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \
|
||||
{ "link_os", LINK_OS_SPEC }, \
|
||||
@@ -182,7 +182,7 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
{ "link_os_ads", LINK_OS_ADS_SPEC }, \
|
||||
{ "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "link_os_mvme", LINK_OS_MVME_SPEC }, \
|
||||
@@ -916,6 +965,10 @@
|
||||
@@ -932,6 +981,10 @@
|
||||
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \
|
||||
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
|
||||
{ "link_secure_plt", LINK_SECURE_PLT_SPEC }, \
|
||||
@@ -193,10 +193,10 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.h gcc-6.3.0-ppc/gcc/config/rs6000/
|
||||
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
||||
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
||||
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
||||
diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.opt gcc-6.3.0-ppc/gcc/config/rs6000/sysv4.opt
|
||||
--- gcc-6.3.0/gcc/config/rs6000/sysv4.opt 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.3.0-ppc/gcc/config/rs6000/sysv4.opt 2017-01-05 02:42:41.984000000 +0000
|
||||
@@ -120,6 +120,30 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/config/rs6000/sysv4.opt gcc-8.1.0-ppc/gcc/config/rs6000/sysv4.opt
|
||||
--- gcc-8.1.0/gcc/config/rs6000/sysv4.opt 2018-04-11 16:25:42.000000000 +0100
|
||||
+++ gcc-8.1.0-ppc/gcc/config/rs6000/sysv4.opt 2018-05-14 03:54:39.539914747 +0100
|
||||
@@ -124,6 +124,30 @@
|
||||
Target RejectNegative
|
||||
Link with libads.a, libc.a and crt0.o.
|
||||
|
||||
@@ -227,22 +227,22 @@ diff -NBaur gcc-6.3.0/gcc/config/rs6000/sysv4.opt gcc-6.3.0-ppc/gcc/config/rs600
|
||||
myellowknife
|
||||
Target RejectNegative
|
||||
Link with libyk.a, libc.a and crt0.o.
|
||||
diff -NBaur gcc-6.3.0/gcc/config.gcc gcc-6.3.0-ppc/gcc/config.gcc
|
||||
--- gcc-6.3.0/gcc/config.gcc 2016-11-07 21:38:43.000000000 +0000
|
||||
+++ gcc-6.3.0-ppc/gcc/config.gcc 2017-01-05 02:42:41.984000000 +0000
|
||||
@@ -2390,7 +2390,7 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/config.gcc gcc-8.1.0-ppc/gcc/config.gcc
|
||||
--- gcc-8.1.0/gcc/config.gcc 2018-04-27 20:31:35.000000000 +0100
|
||||
+++ gcc-8.1.0-ppc/gcc/config.gcc 2018-05-14 03:58:47.902895652 +0100
|
||||
@@ -2459,7 +2459,7 @@
|
||||
use_gcc_stdint=wrap
|
||||
;;
|
||||
powerpc-*-eabi*)
|
||||
- tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/750cl.h"
|
||||
- tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h"
|
||||
+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/750cl.h"
|
||||
extra_options="${extra_options} rs6000/sysv4.opt"
|
||||
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
|
||||
use_gcc_stdint=wrap
|
||||
diff -NBaur gcc-6.3.0/gcc/Makefile.in gcc-6.3.0-ppc/gcc/Makefile.in
|
||||
--- gcc-6.3.0/gcc/Makefile.in 2016-11-22 17:33:07.000000000 +0000
|
||||
+++ gcc-6.3.0-ppc/gcc/Makefile.in 2017-01-05 02:42:41.988000000 +0000
|
||||
@@ -1073,8 +1073,8 @@
|
||||
diff -NBaur gcc-8.1.0/gcc/Makefile.in gcc-8.1.0-ppc/gcc/Makefile.in
|
||||
--- gcc-8.1.0/gcc/Makefile.in 2018-03-09 15:24:44.000000000 +0000
|
||||
+++ gcc-8.1.0-ppc/gcc/Makefile.in 2018-05-14 03:54:39.539914747 +0100
|
||||
@@ -1098,8 +1098,8 @@
|
||||
# things like the go/%.o rule work properly; but we use $(*F) for the
|
||||
# file part, as we just want the file part of the stem, not the entire
|
||||
# file name.
|
||||
@@ -253,9 +253,9 @@ diff -NBaur gcc-6.3.0/gcc/Makefile.in gcc-6.3.0-ppc/gcc/Makefile.in
|
||||
else
|
||||
COMPILE = source='$<' object='$@' libtool=no \
|
||||
DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) $(COMPILE.base)
|
||||
diff -NBaur gcc-6.3.0/libcpp/Makefile.in gcc-6.3.0-ppc/libcpp/Makefile.in
|
||||
--- gcc-6.3.0/libcpp/Makefile.in 2016-12-21 07:53:39.000000000 +0000
|
||||
+++ gcc-6.3.0-ppc/libcpp/Makefile.in 2017-01-05 02:42:41.988000000 +0000
|
||||
diff -NBaur gcc-8.1.0/libcpp/Makefile.in gcc-8.1.0-ppc/libcpp/Makefile.in
|
||||
--- gcc-8.1.0/libcpp/Makefile.in 2018-05-02 09:19:58.000000000 +0100
|
||||
+++ gcc-8.1.0-ppc/libcpp/Makefile.in 2018-05-14 03:54:39.543938012 +0100
|
||||
@@ -208,8 +208,7 @@
|
||||
# Note that we put the dependencies into a .Tpo file, then move them
|
||||
# into place if the compile succeeds. We need this because gcc does
|
||||
@@ -266,9 +266,9 @@ diff -NBaur gcc-6.3.0/libcpp/Makefile.in gcc-6.3.0-ppc/libcpp/Makefile.in
|
||||
else
|
||||
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
|
||||
$(depcomp) $(COMPILE.base)
|
||||
diff -NBaur gcc-6.3.0/libgcc/config/rs6000/crtrestvr.S gcc-6.3.0-ppc/libgcc/config/rs6000/crtrestvr.S
|
||||
--- gcc-6.3.0/libgcc/config/rs6000/crtrestvr.S 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.3.0-ppc/libgcc/config/rs6000/crtrestvr.S 2017-01-05 02:42:41.988000000 +0000
|
||||
diff -NBaur gcc-8.1.0/libgcc/config/rs6000/crtrestvr.S gcc-8.1.0-ppc/libgcc/config/rs6000/crtrestvr.S
|
||||
--- gcc-8.1.0/libgcc/config/rs6000/crtrestvr.S 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-ppc/libgcc/config/rs6000/crtrestvr.S 2018-05-14 03:54:39.543938012 +0100
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* On PowerPC64 Linux, these functions are provided by the linker. */
|
||||
@@ -278,14 +278,14 @@ diff -NBaur gcc-6.3.0/libgcc/config/rs6000/crtrestvr.S gcc-6.3.0-ppc/libgcc/conf
|
||||
#undef __ALTIVEC__
|
||||
#define __ALTIVEC__ 1
|
||||
#include "ppc-asm.h"
|
||||
@@ -85,3 +85,4 @@
|
||||
@@ -86,3 +86,4 @@
|
||||
CFI_ENDPROC
|
||||
|
||||
#endif
|
||||
+#endif
|
||||
diff -NBaur gcc-6.3.0/libgcc/config/rs6000/crtsavevr.S gcc-6.3.0-ppc/libgcc/config/rs6000/crtsavevr.S
|
||||
--- gcc-6.3.0/libgcc/config/rs6000/crtsavevr.S 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.3.0-ppc/libgcc/config/rs6000/crtsavevr.S 2017-01-05 02:42:41.988000000 +0000
|
||||
diff -NBaur gcc-8.1.0/libgcc/config/rs6000/crtsavevr.S gcc-8.1.0-ppc/libgcc/config/rs6000/crtsavevr.S
|
||||
--- gcc-8.1.0/libgcc/config/rs6000/crtsavevr.S 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-ppc/libgcc/config/rs6000/crtsavevr.S 2018-05-14 03:54:39.543938012 +0100
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* On PowerPC64 Linux, these functions are provided by the linker. */
|
||||
@@ -295,14 +295,14 @@ diff -NBaur gcc-6.3.0/libgcc/config/rs6000/crtsavevr.S gcc-6.3.0-ppc/libgcc/conf
|
||||
#undef __ALTIVEC__
|
||||
#define __ALTIVEC__ 1
|
||||
#include "ppc-asm.h"
|
||||
@@ -85,3 +85,4 @@
|
||||
@@ -86,3 +86,4 @@
|
||||
CFI_ENDPROC
|
||||
|
||||
#endif
|
||||
+#endif
|
||||
diff -NBaur gcc-6.3.0/libgcc/crtstuff.c gcc-6.3.0-ppc/libgcc/crtstuff.c
|
||||
--- gcc-6.3.0/libgcc/crtstuff.c 2016-01-04 14:30:50.000000000 +0000
|
||||
+++ gcc-6.3.0-ppc/libgcc/crtstuff.c 2017-01-05 02:42:41.988000000 +0000
|
||||
diff -NBaur gcc-8.1.0/libgcc/crtstuff.c gcc-8.1.0-ppc/libgcc/crtstuff.c
|
||||
--- gcc-8.1.0/libgcc/crtstuff.c 2018-01-03 10:03:58.000000000 +0000
|
||||
+++ gcc-8.1.0-ppc/libgcc/crtstuff.c 2018-05-14 03:54:39.543938012 +0100
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
/* Target machine header files require this define. */
|
||||
@@ -1,18 +0,0 @@
|
||||
diff -NBaur gdb-7.10/gdb/Makefile.in gdb-7.10-ppc/gdb/Makefile.in
|
||||
--- gdb-7.10/gdb/Makefile.in 2015-08-28 22:22:07.000000000 +0100
|
||||
+++ gdb-7.10-ppc/gdb/Makefile.in 2015-11-09 09:21:13.228003995 +0000
|
||||
@@ -2676,10 +2676,10 @@
|
||||
# Note that we put the dependencies into a .Tpo file, then move them
|
||||
# into place if the compile succeeds. We need this because gcc does
|
||||
# not atomically write the dependency output file.
|
||||
-@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
|
||||
-@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo
|
||||
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
||||
-@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
|
||||
+#@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
|
||||
+#@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo
|
||||
+#@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
||||
+#@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
|
||||
@GMAKE_TRUE@else
|
||||
@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
|
||||
@GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
|
||||
@@ -624,7 +624,7 @@ index 0000000..b6cdfae
|
||||
+m4_include([../acinclude.m4])
|
||||
diff --git a/libgloss/libsysbase/build_argv.c b/libgloss/libsysbase/build_argv.c
|
||||
new file mode 100644
|
||||
index 0000000..79d2006
|
||||
index 0000000..3ca95d5
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/build_argv.c
|
||||
@@ -0,0 +1,31 @@
|
||||
@@ -646,13 +646,13 @@ index 0000000..79d2006
|
||||
+ char** argv = (char**)(((int)data + len + sizeof(char **)) & ~(sizeof(char **)-1));
|
||||
+ char* end = data + len - 1;
|
||||
+ int argCount = 0;
|
||||
+
|
||||
+
|
||||
+ do {
|
||||
+ argv[argCount++] = data; // Add next arg to argv list
|
||||
+ while (*(data) && data < end) data++; // Move to next NULL delimiter
|
||||
+ data++; // Move to one after the NULL delimiter
|
||||
+ } while (data < end);
|
||||
+
|
||||
+
|
||||
+ *end = '\0'; // Force NULL terminator for last arg
|
||||
+
|
||||
+ argstruct->argv = argv;
|
||||
@@ -661,7 +661,7 @@ index 0000000..79d2006
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/chdir.c b/libgloss/libsysbase/chdir.c
|
||||
new file mode 100644
|
||||
index 0000000..2a0fa03
|
||||
index 0000000..90d2dc5
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/chdir.c
|
||||
@@ -0,0 +1,201 @@
|
||||
@@ -716,7 +716,7 @@ index 0000000..2a0fa03
|
||||
+ }
|
||||
+
|
||||
+ /* Grab the next directory name from extra */
|
||||
+ extraEnd = strchr (extra, DIRECTORY_SEPARATOR_CHAR);
|
||||
+ extraEnd = strchr (extra, DIRECTORY_SEPARATOR_CHAR);
|
||||
+ if (extraEnd == NULL) {
|
||||
+ extraEnd = strrchr (extra, '\0');
|
||||
+ } else {
|
||||
@@ -728,12 +728,12 @@ index 0000000..2a0fa03
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if ((strncmp (extra, DIRECTORY_THIS, sizeof(DIRECTORY_THIS) - 1) == 0)
|
||||
+ if ((strncmp (extra, DIRECTORY_THIS, sizeof(DIRECTORY_THIS) - 1) == 0)
|
||||
+ && ((extra[sizeof(DIRECTORY_THIS)-1] == DIRECTORY_SEPARATOR_CHAR)
|
||||
+ ||(extra[sizeof(DIRECTORY_THIS)-1] == '\0')))
|
||||
+ {
|
||||
+ /* Don't copy anything */
|
||||
+ } else if ((strncmp (extra, DIRECTORY_PARENT, sizeof(DIRECTORY_PARENT) - 1) == 0)
|
||||
+ } else if ((strncmp (extra, DIRECTORY_PARENT, sizeof(DIRECTORY_PARENT) - 1) == 0)
|
||||
+ && ((extra[sizeof(DIRECTORY_PARENT)-1] == DIRECTORY_SEPARATOR_CHAR)
|
||||
+ ||(extra[sizeof(DIRECTORY_PARENT)-1] == '\0')))
|
||||
+ {
|
||||
@@ -868,7 +868,7 @@ index 0000000..2a0fa03
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/chmod.c b/libgloss/libsysbase/chmod.c
|
||||
new file mode 100644
|
||||
index 0000000..ce79a2c
|
||||
index 0000000..3668b58
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/chmod.c
|
||||
@@ -0,0 +1,30 @@
|
||||
@@ -886,7 +886,7 @@ index 0000000..ce79a2c
|
||||
+
|
||||
+ /* Get device from path name */
|
||||
+ dev = FindDevice(path);
|
||||
+
|
||||
+
|
||||
+ if (dev < 0) {
|
||||
+ r->_errno = ENODEV;
|
||||
+ ret = -1;
|
||||
@@ -904,7 +904,7 @@ index 0000000..ce79a2c
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/close.c b/libgloss/libsysbase/close.c
|
||||
new file mode 100644
|
||||
index 0000000..d3563fb
|
||||
index 0000000..a251e5b
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/close.c
|
||||
@@ -0,0 +1,49 @@
|
||||
@@ -940,7 +940,7 @@ index 0000000..d3563fb
|
||||
+ dev = handle->device;
|
||||
+ handle->refcount--;
|
||||
+ if (handle->refcount == 0 ) {
|
||||
+
|
||||
+
|
||||
+ if(devoptab_list[dev]->close_r) {
|
||||
+ ptr->deviceData = devoptab_list[dev]->deviceData;
|
||||
+ ret = devoptab_list[dev]->close_r(ptr,handle->fileStruct);
|
||||
@@ -989,7 +989,7 @@ index 0000000..48ce950
|
||||
+/* symbol prefix */
|
||||
+#undef __SYMBOL_PREFIX
|
||||
diff --git a/libgloss/libsysbase/configure b/libgloss/libsysbase/configure
|
||||
new file mode 100755
|
||||
new file mode 100644
|
||||
index 0000000..874eec1
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/configure
|
||||
@@ -5154,7 +5154,7 @@ index 0000000..874eec1
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/configure.in b/libgloss/libsysbase/configure.in
|
||||
new file mode 100644
|
||||
index 0000000..c127df0
|
||||
index 0000000..f3b8380
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/configure.in
|
||||
@@ -0,0 +1,199 @@
|
||||
@@ -5214,9 +5214,9 @@ index 0000000..c127df0
|
||||
+ d10v*)
|
||||
+ ;;
|
||||
+ h8300*-*-*)
|
||||
+ ;;
|
||||
+ ;;
|
||||
+ h8500-*-*)
|
||||
+ ;;
|
||||
+ ;;
|
||||
+ i[3456]86-*-sco*)
|
||||
+ ;;
|
||||
+ lm32-*-*)
|
||||
@@ -5239,7 +5239,7 @@ index 0000000..c127df0
|
||||
+ v850*-*-*)
|
||||
+ ;;
|
||||
+ w65-*-*)
|
||||
+ ;;
|
||||
+ ;;
|
||||
+ xstormy16-*-*)
|
||||
+ ;;
|
||||
+ z8k-*-*)
|
||||
@@ -5734,7 +5734,7 @@ index 0000000..c6b8c92
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/fork.c b/libgloss/libsysbase/fork.c
|
||||
new file mode 100644
|
||||
index 0000000..712b13e
|
||||
index 0000000..3aa75a3
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/fork.c
|
||||
@@ -0,0 +1,25 @@
|
||||
@@ -5753,7 +5753,7 @@ index 0000000..712b13e
|
||||
+ struct _reent * r) {
|
||||
+//---------------------------------------------------------------------------------
|
||||
+#else
|
||||
+//---------------------------------------------------------------------------------
|
||||
+//---------------------------------------------------------------------------------
|
||||
+int
|
||||
+_DEFUN (_fork, (),
|
||||
+ _NOARGS) {
|
||||
@@ -6470,7 +6470,7 @@ index 0000000..4565909
|
||||
+char *fake_heap_start = (char*)0;
|
||||
diff --git a/libgloss/libsysbase/mkdir.c b/libgloss/libsysbase/mkdir.c
|
||||
new file mode 100644
|
||||
index 0000000..4175cf8
|
||||
index 0000000..b4fcbd3
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/mkdir.c
|
||||
@@ -0,0 +1,19 @@
|
||||
@@ -6490,7 +6490,7 @@ index 0000000..4175cf8
|
||||
+ } else {
|
||||
+ r->_errno = ENOSYS;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/open.c b/libgloss/libsysbase/open.c
|
||||
@@ -6613,7 +6613,7 @@ index 0000000..7f3f7f2
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/rename.c b/libgloss/libsysbase/rename.c
|
||||
new file mode 100644
|
||||
index 0000000..7520d1d
|
||||
index 0000000..f8a0aa9
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/rename.c
|
||||
@@ -0,0 +1,41 @@
|
||||
@@ -6655,7 +6655,7 @@ index 0000000..7520d1d
|
||||
+ } else {
|
||||
+ r->_errno = EXDEV;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/rmdir.c b/libgloss/libsysbase/rmdir.c
|
||||
@@ -6774,7 +6774,7 @@ index 0000000..e474c47
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/statvfs.c b/libgloss/libsysbase/statvfs.c
|
||||
new file mode 100644
|
||||
index 0000000..b3dec22
|
||||
index 0000000..84e2213
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/statvfs.c
|
||||
@@ -0,0 +1,24 @@
|
||||
@@ -6799,12 +6799,12 @@ index 0000000..b3dec22
|
||||
+ } else {
|
||||
+ r->_errno = ENOSYS;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/syscall_support.c b/libgloss/libsysbase/syscall_support.c
|
||||
new file mode 100644
|
||||
index 0000000..70d717a
|
||||
index 0000000..939ec25
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/syscall_support.c
|
||||
@@ -0,0 +1,63 @@
|
||||
@@ -6824,7 +6824,7 @@ index 0000000..70d717a
|
||||
+ NULL // gettod_r
|
||||
+};
|
||||
+
|
||||
+int __libc_lock_init(int *lock,int recursive) {
|
||||
+int __libc_lock_init(int *lock,int recursive) {
|
||||
+
|
||||
+ if ( __syscalls.lock_init ) {
|
||||
+ return __syscalls.lock_init(lock, recursive);
|
||||
@@ -6856,7 +6856,7 @@ index 0000000..70d717a
|
||||
+ if ( __syscalls.lock_acquire) {
|
||||
+ return __syscalls.lock_acquire(lock);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
@@ -6873,7 +6873,7 @@ index 0000000..70d717a
|
||||
+}
|
||||
diff --git a/libgloss/libsysbase/times.c b/libgloss/libsysbase/times.c
|
||||
new file mode 100644
|
||||
index 0000000..67db6c7
|
||||
index 0000000..45e9781
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/times.c
|
||||
@@ -0,0 +1,21 @@
|
||||
@@ -6890,7 +6890,7 @@ index 0000000..67db6c7
|
||||
+ struct tms *ptms) {
|
||||
+#else
|
||||
+clock_t _DEFUN (_times, (buf),
|
||||
+ struct tms *buf) {
|
||||
+ struct tms *buf) {
|
||||
+
|
||||
+ struct _reent *r = _REENT;
|
||||
+#endif
|
||||
@@ -7007,7 +7007,7 @@ index 0000000..9a61639
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/wait.c b/libgloss/libsysbase/wait.c
|
||||
new file mode 100644
|
||||
index 0000000..322c847
|
||||
index 0000000..f64bf13
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/wait.c
|
||||
@@ -0,0 +1,29 @@
|
||||
@@ -7020,22 +7020,22 @@ index 0000000..322c847
|
||||
+#include <_syslist.h>
|
||||
+#include <errno.h>
|
||||
+
|
||||
+//---------------------------------------------------------------------------------
|
||||
+//---------------------------------------------------------------------------------
|
||||
+#ifdef REENTRANT_SYSCALLS_PROVIDED
|
||||
+//---------------------------------------------------------------------------------
|
||||
+//---------------------------------------------------------------------------------
|
||||
+int
|
||||
+_DEFUN (_wait_r, (r, status),
|
||||
+ struct _reent *r _AND
|
||||
+ int *status) {
|
||||
+
|
||||
+#else
|
||||
+//---------------------------------------------------------------------------------
|
||||
+//---------------------------------------------------------------------------------
|
||||
+int
|
||||
+_DEFUN (_wait, (status),
|
||||
+ int *status) {
|
||||
+ struct _reent *r = _REENT;
|
||||
+#endif
|
||||
+//---------------------------------------------------------------------------------
|
||||
+//---------------------------------------------------------------------------------
|
||||
+ r->_errno = ENOSYS;
|
||||
+ return -1;
|
||||
+}
|
||||
@@ -7622,6 +7622,93 @@ index 8572821..57dee54 100644
|
||||
{
|
||||
return __get_current_locale ()->ctype_ptr;
|
||||
}
|
||||
diff --git a/newlib/libc/machine/powerpc/Makefile.am b/newlib/libc/machine/powerpc/Makefile.am
|
||||
index e86afdf..007bd15 100644
|
||||
--- a/newlib/libc/machine/powerpc/Makefile.am
|
||||
+++ b/newlib/libc/machine/powerpc/Makefile.am
|
||||
@@ -10,7 +10,7 @@ noinst_LIBRARIES = lib.a
|
||||
|
||||
AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
|
||||
|
||||
-lib_a_SOURCES = setjmp.S
|
||||
+lib_a_SOURCES = setjmp.S access.c
|
||||
lib_a_CCASFLAGS=$(AM_CCASFLAGS)
|
||||
lib_a_CFLAGS=$(AM_CFLAGS)
|
||||
lib_a_LIBADD = @extra_objs@
|
||||
diff --git a/newlib/libc/machine/powerpc/Makefile.in b/newlib/libc/machine/powerpc/Makefile.in
|
||||
index 73b0cc4..12044cb 100644
|
||||
--- a/newlib/libc/machine/powerpc/Makefile.in
|
||||
+++ b/newlib/libc/machine/powerpc/Makefile.in
|
||||
@@ -68,7 +68,7 @@ CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
lib_a_AR = $(AR) $(ARFLAGS)
|
||||
-am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT)
|
||||
+am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-access.$(OBJEXT)
|
||||
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp =
|
||||
@@ -196,7 +196,7 @@ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
|
||||
AM_CCASFLAGS = $(INCLUDES)
|
||||
noinst_LIBRARIES = lib.a
|
||||
AM_CFLAGS = -I $(srcdir)/../../stdio -I $(srcdir)/../../stdlib
|
||||
-lib_a_SOURCES = setjmp.S
|
||||
+lib_a_SOURCES = setjmp.S access.c
|
||||
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
|
||||
lib_a_CFLAGS = $(AM_CFLAGS)
|
||||
lib_a_LIBADD = @extra_objs@
|
||||
@@ -280,6 +280,12 @@ lib_a-setjmp.obj: setjmp.S
|
||||
.c.obj:
|
||||
$(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
+lib_a-access.o: access.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-access.o `test -f 'access.c' || echo '$(srcdir)/'`access.c
|
||||
+
|
||||
+lib_a-access.obj: access.c
|
||||
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-access.obj `if test -f 'access.c'; then $(CYGPATH_W) 'access.c'; else $(CYGPATH_W) '$(srcdir)/access.c'; fi`
|
||||
+
|
||||
lib_a-vfprintf.o: vfprintf.c
|
||||
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vfprintf.o `test -f 'vfprintf.c' || echo '$(srcdir)/'`vfprintf.c
|
||||
|
||||
diff --git a/newlib/libc/machine/powerpc/access.c b/newlib/libc/machine/powerpc/access.c
|
||||
new file mode 100644
|
||||
index 0000000..980682e
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/machine/powerpc/access.c
|
||||
@@ -0,0 +1,33 @@
|
||||
+/* This is file ACCESS.C */
|
||||
+/*
|
||||
+ * Copyright (C) 1993 DJ Delorie
|
||||
+ * All rights reserved.
|
||||
+ *
|
||||
+ * Redistribution, modification, and use in source and binary forms is permitted
|
||||
+ * provided that the above copyright notice and following paragraph are
|
||||
+ * duplicated in all such forms.
|
||||
+ *
|
||||
+ * This file is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+ */
|
||||
+
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int access(const char *fn, int flags)
|
||||
+{
|
||||
+ struct stat s;
|
||||
+ if (stat(fn, &s))
|
||||
+ return -1;
|
||||
+ if (s.st_mode & S_IFDIR)
|
||||
+ return 0;
|
||||
+ if (flags & W_OK)
|
||||
+ {
|
||||
+ if (s.st_mode & S_IWRITE)
|
||||
+ return 0;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
diff --git a/newlib/libc/machine/powerpc/machine/_types.h b/newlib/libc/machine/powerpc/machine/_types.h
|
||||
new file mode 100644
|
||||
index 0000000..a7d63da
|
||||
|
||||
@@ -1,38 +1,4 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# change shell on Snow Leopard
|
||||
#---------------------------------------------------------------------------------
|
||||
UNAME_S := $(shell uname -s)
|
||||
UNAME_R := $(shell uname -r)
|
||||
|
||||
ifneq (,$(findstring Darwin,$(UNAME_S)))
|
||||
ifneq (,$(findstring 10.8.0,$(UNAME_R)))
|
||||
export SHELL=/bin/bash
|
||||
endif
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# path to tools
|
||||
#---------------------------------------------------------------------------------
|
||||
export PORTLIBS := $(DEVKITPRO)/portlibs/ppc
|
||||
export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# the prefix on the compiler executables
|
||||
#---------------------------------------------------------------------------------
|
||||
PREFIX := powerpc-eabi-
|
||||
|
||||
export AS := $(PREFIX)as
|
||||
export CC := $(PREFIX)gcc
|
||||
export CXX := $(PREFIX)g++
|
||||
export AR := $(PREFIX)ar
|
||||
export OBJCOPY := $(PREFIX)objcopy
|
||||
|
||||
|
||||
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
|
||||
|
||||
ifneq (,$(ISVC))
|
||||
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
|
||||
endif
|
||||
include $(DEVKITPPC)/base_tools
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
%.a:
|
||||
@@ -45,7 +11,7 @@ endif
|
||||
%.o: %.cpp
|
||||
@echo $(notdir $<)
|
||||
@$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
%.o: %.c
|
||||
@echo $(notdir $<)
|
||||
|
||||
37
dkppc/rules/base_tools
Normal file
37
dkppc/rules/base_tools
Normal file
@@ -0,0 +1,37 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# change shell on Snow Leopard
|
||||
#---------------------------------------------------------------------------------
|
||||
UNAME_S := $(shell uname -s)
|
||||
UNAME_R := $(shell uname -r)
|
||||
|
||||
ifneq (,$(findstring Darwin,$(UNAME_S)))
|
||||
ifneq (,$(findstring 10.8.0,$(UNAME_R)))
|
||||
export SHELL=/bin/bash
|
||||
endif
|
||||
endif
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# path to tools
|
||||
#---------------------------------------------------------------------------------
|
||||
DEVKITPATH=$(shell echo "$(DEVKITPRO)" | sed -e 's/^\([a-zA-Z]\):/\/\1/')
|
||||
|
||||
export PORTLIBS := $(DEVKITPATH)/portlibs/ppc
|
||||
export PATH := $(DEVKITPATH)/tools/bin:$(DEVKITPATH)/devkitPPC/bin:$(PORTLIBS)/bin:$(PATH)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# the prefix on the compiler executables
|
||||
#---------------------------------------------------------------------------------
|
||||
PREFIX := powerpc-eabi-
|
||||
|
||||
export AS := $(PREFIX)as
|
||||
export CC := $(PREFIX)gcc
|
||||
export CXX := $(PREFIX)g++
|
||||
export AR := $(PREFIX)ar
|
||||
export OBJCOPY := $(PREFIX)objcopy
|
||||
|
||||
|
||||
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
|
||||
|
||||
ifneq (,$(ISVC))
|
||||
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
|
||||
endif
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export DEVKITPPC=$TOOLPATH/devkitPPC
|
||||
export DEVKITPRO=$TOOLPATH
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Install and build the gamecube crt and libogc
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
echo "installing linkscripts ..."
|
||||
cp $BUILDSCRIPTDIR/dkppc/crtls/*.ld $prefix/$target/lib/
|
||||
#---------------------------------------------------------------------------------
|
||||
# copy base rulesets
|
||||
#---------------------------------------------------------------------------------
|
||||
cp $BUILDSCRIPTDIR/dkppc/rules/* $prefix
|
||||
|
||||
cd $BUILDDIR/libogc-$LIBOGC_VER
|
||||
|
||||
if [ ! -f installed ]; then
|
||||
echo "Building & installing libogc"
|
||||
$MAKE install || { echo "libogc install failed"; exit 1; }
|
||||
touch installed
|
||||
fi
|
||||
|
||||
cd $BUILDDIR/libfat-$LIBFAT_VER
|
||||
|
||||
if [ ! -f installed ]; then
|
||||
echo "Building & installing libfat"
|
||||
$MAKE ogc-install || { echo "libfat install failed"; exit 1; }
|
||||
touch installed
|
||||
fi
|
||||
|
||||
@@ -95,8 +95,10 @@ then
|
||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
||||
--prefix=$prefix\
|
||||
--with-system-zlib\
|
||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 29-1" \
|
||||
--with-bugurl="https://github.com/devkitpro/buildscripts/issues" --with-pkgversion="devkitPPC release 30" \
|
||||
$CROSS_PARAMS \
|
||||
$CROSS_GCC_PARAMS \
|
||||
CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \
|
||||
|| { echo "Error configuring gcc stage 1"; exit 1; }
|
||||
touch configured-gcc
|
||||
fi
|
||||
@@ -123,6 +125,11 @@ cd $target/newlib
|
||||
unset CFLAGS
|
||||
unset LDFLAGS
|
||||
|
||||
OLD_CC=$CC
|
||||
OLD_CXX=$CXX
|
||||
unset CC
|
||||
unset CXX
|
||||
|
||||
if [ ! -f configured-newlib ]
|
||||
then
|
||||
CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \
|
||||
@@ -146,6 +153,9 @@ then
|
||||
touch installed-newlib
|
||||
fi
|
||||
|
||||
export CC=$OLD_CC
|
||||
export CXX=$OLD_CXX
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build and install the final compiler
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -168,6 +178,17 @@ fi
|
||||
|
||||
rm -fr $prefix/$target/sys-include
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Install and build the gamecube crt and libogc
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
echo "installing linkscripts ..."
|
||||
cp $BUILDSCRIPTDIR/dkppc/crtls/*.ld $prefix/$target/lib/
|
||||
#---------------------------------------------------------------------------------
|
||||
# copy base rulesets
|
||||
#---------------------------------------------------------------------------------
|
||||
cp $BUILDSCRIPTDIR/dkppc/rules/* $prefix
|
||||
|
||||
cd $BUILDDIR
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
21
dkppc/scripts/build-libs.sh
Normal file
21
dkppc/scripts/build-libs.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
export DEVKITPPC=$TOOLPATH/devkitPPC
|
||||
export DEVKITPRO=$TOOLPATH
|
||||
|
||||
cd $BUILDDIR/libogc-$LIBOGC_VER
|
||||
|
||||
if [ ! -f installed ]; then
|
||||
echo "Building & installing libogc"
|
||||
$MAKE install || { echo "libogc install failed"; exit 1; }
|
||||
touch installed
|
||||
fi
|
||||
|
||||
cd $BUILDDIR/libfat-$LIBFAT_VER
|
||||
|
||||
if [ ! -f installed ]; then
|
||||
echo "Building & installing libfat"
|
||||
$MAKE ogc-install || { echo "libfat install failed"; exit 1; }
|
||||
touch installed
|
||||
fi
|
||||
|
||||
@@ -6,7 +6,7 @@ do
|
||||
dir=$(echo $archive | sed -e 's/\(.*\)\.tar\.bz2/\1/' )
|
||||
cd $BUILDDIR/$dir
|
||||
if [ ! -f configured ]; then
|
||||
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$prefix --disable-dependency-tracking $CROSS_PARAMS || { echo "error configuring $archive"; exit 1; }
|
||||
CXXFLAGS=$cflags CFLAGS=$cflags LDFLAGS=$ldflags ./configure --prefix=$toolsprefix --disable-dependency-tracking $CROSS_PARAMS || { echo "error configuring $archive"; exit 1; }
|
||||
touch configured
|
||||
fi
|
||||
if [ ! -f built ]; then
|
||||
|
||||
@@ -30,9 +30,9 @@ done
|
||||
|
||||
case "$VERSION" in
|
||||
"1" )
|
||||
GCC_VER=7.1.0
|
||||
BINUTILS_VER=2.28
|
||||
NEWLIB_VER=2.5.0
|
||||
GCC_VER=8.1.0
|
||||
BINUTILS_VER=2.30
|
||||
NEWLIB_VER=3.0.0
|
||||
GDB_VER=8.0
|
||||
basedir='dkarm-eabi'
|
||||
package=devkitARM
|
||||
@@ -40,18 +40,18 @@ case "$VERSION" in
|
||||
toolchain=DEVKITARM
|
||||
;;
|
||||
"2" )
|
||||
GCC_VER=6.3.0
|
||||
BINUTILS_VER=2.27
|
||||
GCC_VER=8.1.0
|
||||
BINUTILS_VER=2.28
|
||||
MN_BINUTILS_VER=2.17
|
||||
NEWLIB_VER=2.5.0
|
||||
GDB_VER=7.11
|
||||
GDB_VER=8.0.1
|
||||
basedir='dkppc'
|
||||
package=devkitPPC
|
||||
target=powerpc-eabi
|
||||
toolchain=DEVKITPPC
|
||||
;;
|
||||
"3" )
|
||||
GCC_VER=7.3.0
|
||||
GCC_VER=8.1.0
|
||||
BINUTILS_VER=2.30
|
||||
NEWLIB_VER=3.0.0
|
||||
GDB_VER=8.0
|
||||
|
||||
Reference in New Issue
Block a user