Add a doc on building yggdrasil, updated toolchain patches
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
.PHONY: doc
|
||||
ifeq ($(ARCH),)
|
||||
$(error Target architecture is not specified: $${ARCH})
|
||||
endif
|
||||
#ifeq ($(ARCH),)
|
||||
#$(error Target architecture is not specified: $${ARCH})
|
||||
#endif
|
||||
|
||||
ifeq ($(ARCH),amd64)
|
||||
CFLAGS+=-DARCH_AMD64
|
||||
|
||||
@@ -0,0 +1,331 @@
|
||||
Building yggdrasil
|
||||
==================
|
||||
|
||||
Building yggdrasil is pretty straightforward and similar to how you
|
||||
build a Linux distribution. To build a full OS, you'll need:
|
||||
|
||||
1. GCC and binutils toolchain.
|
||||
2. The kernel itself.
|
||||
3. C library (newlib at the moment of writing).
|
||||
4. A set of userspace applications (at least some kind of ``/init``).
|
||||
|
||||
.. note
|
||||
|
||||
Sadly, I haven't had much time and/or priority to test building
|
||||
yggdrasil kernel with clang, but as far as I've tried, there were
|
||||
problems causing crashes in early loader stage.
|
||||
|
||||
1. Preparation
|
||||
--------------
|
||||
|
||||
Build dependencies:
|
||||
|
||||
* GNU binutils and gcc (for host programs), any non-ancient version should
|
||||
suffice, I guess.
|
||||
* git
|
||||
* make
|
||||
* autotools (autoconf + automake)
|
||||
|
||||
Optional:
|
||||
* sphinx (for building HTML documentation)
|
||||
|
||||
Get the kernel sources:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git clone https://git.alnyan.me/alnyan/yggdrasil.git
|
||||
cd yggdrasil
|
||||
# This is recommended
|
||||
git checkout dev
|
||||
|
||||
Get the userspace sources:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git clone https://git.alnyan.me/alnyan/ygg-userspace.git
|
||||
cd ygg-userspace
|
||||
# This is recommended
|
||||
git checkout dev
|
||||
|
||||
Get GNU binutils sources:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git clone git://sourceware.org/git/binutils-gdb.git
|
||||
cd binutils-gdb
|
||||
git checkout binutils-2_33_1
|
||||
|
||||
# OR
|
||||
|
||||
curl -O https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.xz
|
||||
tar xf binutils-2.33.1.tar.xz
|
||||
|
||||
Get yggdrasil-newlib sources:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
git clone https://git.alnyan.me/alnyan/newlib-yggdrasil.git
|
||||
cd newlib-yggdrasil
|
||||
# Make sure to check out "yggdrasil" branch
|
||||
git checkout yggdrasil
|
||||
|
||||
Additionally, newlib uses legacy autotools features, so you'll need to
|
||||
install autoconf v2.65 and automake v1.11 into some location, say, ``<old autotools>``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
curl -O https://ftp.gnu.org/gnu/automake/automake-1.11.tar.gz
|
||||
curl -O https://ftp.gnu.org/gnu/autoconf/autoconf-2.65.tar.gz
|
||||
tar xf automake-1.11.tar.gz
|
||||
tar xf autoconf-2.65.tar.gz
|
||||
mkdir automake-build autoconf-build
|
||||
|
||||
# Build old automake
|
||||
cd automake-build
|
||||
../automake-1.11/configure --prefix=<old autotools>
|
||||
make && make install
|
||||
|
||||
# Build old autotools
|
||||
cd autoconf-build
|
||||
../autoconf-2.64/configure --prefix=<old autotools>
|
||||
make && make install
|
||||
|
||||
2. The toolchain
|
||||
----------------
|
||||
|
||||
First, you'll need to set up a proper cross-compiler environment for
|
||||
yggdrasil. While it's possible to just follow instructions on
|
||||
`osdev wiki page <https://wiki.osdev.org/GCC_Cross-Compiler>`_ to build bare
|
||||
kernel, building a full yggdrasil OS-specific toolchain is required for
|
||||
compiling userspace applications making use of libc (newlib at the moment of
|
||||
writing) and kernel headers.
|
||||
|
||||
Current patches are based on:
|
||||
|
||||
* binutils 2.33.1
|
||||
* gcc 9.3.0
|
||||
|
||||
After getting all the sources, you should apply yggdrasil patches to binutils
|
||||
and GCC:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
cd <binutils sources>
|
||||
git apply <yggdrasil sources>/etc/patches/binutils/0001-*.patch
|
||||
cd <gcc sources>
|
||||
git apply <yggdrasil sources>/etc/patches/gcc/0001-*.patch
|
||||
# This is required!
|
||||
cd <gcc directory>/libstdc++-v3 && autoconf
|
||||
|
||||
Configure, build and install binutils:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir binutils-build
|
||||
cd binutils-build
|
||||
<binutils sources>/configure \
|
||||
--target=x86_64-elf-yggdrasil \
|
||||
--disable-nls \
|
||||
--with-sysroot \
|
||||
--prefix=<toolchain prefix>
|
||||
make && make install
|
||||
|
||||
Full GCC installation cannot be performed right now because there's no libc
|
||||
in place and kernel headers were not yet installed. Just run similar commands to
|
||||
install "stage 1" GCC:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir gcc-build
|
||||
cd gcc-build
|
||||
<gcc sources>/configure \
|
||||
--target=x86_64-elf-yggdrasil \
|
||||
--disable-nls \
|
||||
--without-headers \
|
||||
--enable-languages=c,c++
|
||||
--prefix=<toolchain prefix>
|
||||
make all-gcc && make all-target-libgcc && \
|
||||
make install-gcc && make install-target-libgcc
|
||||
|
||||
I'd suggest a coffebreak now, these commands are going to take much time.
|
||||
|
||||
**Optionally**, you may also want to build a 32-bit (i686-elf) cross-compiler
|
||||
for building the bootloader stub in the kernel. This doesn't require any patching,
|
||||
just run the following command to build it from the same sources you've cloned
|
||||
for building binutils and GCC in previous stages:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# In your "main" directory
|
||||
mkdir binutils-build-32
|
||||
cd binutils-build-32
|
||||
<binutils sources>/configure \
|
||||
--target=i686-elf \
|
||||
--disable-nls \
|
||||
--with-sysroot \
|
||||
--prefix=<32-bit toolchain prefix>
|
||||
make && make install
|
||||
|
||||
# In some "main" directory again
|
||||
mkdir gcc-build-32
|
||||
cd gcc-build-32
|
||||
<gcc sources>/configure \
|
||||
--target=i686-elf \
|
||||
--disable-nls \
|
||||
--without-headers \
|
||||
--enable-languages=c,c++ \
|
||||
--prefix=<32-bit toolchain prefix>
|
||||
make all-gcc && make all-target-libgcc && \
|
||||
make install-gcc && make install-target-libgcc
|
||||
|
||||
Again, this is going to take a while.
|
||||
|
||||
.. note
|
||||
|
||||
While it's not necessary to build this 32-bit toolchain, it's considered
|
||||
to be a good practive when cross-compiling for bare-metal environment.
|
||||
See `osdev wiki page <https://wiki.osdev.org/GCC_Cross-Compiler>`_.
|
||||
|
||||
3. Building the kernel
|
||||
----------------------
|
||||
|
||||
I recommend creating some kind of "env" file for easier environment
|
||||
setup when working with the toolchain:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
export ARCH=amd64
|
||||
export KERNEL_DIR=<yggdrasil sources>
|
||||
export PATH="<toolchain prefix>/bin:$PATH"
|
||||
export INSTALL_HDR=<toolchain prefix>/x86_64-elf-yggdrasil/include
|
||||
|
||||
# Uncomment the "####" line to use your system's compiler (assuming x86/x86-64)
|
||||
# in case you've decided not to build i686-elf- toolchain for cross-compiling
|
||||
#### export CC86="gcc -m32"
|
||||
|
||||
The kernel is then built using ``make`` command, but first you'll need to provide a
|
||||
config file for it (just copy ``defconfig``):
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
cd <kernel sources>
|
||||
cp defconfig config
|
||||
make
|
||||
|
||||
Now that the kernel itself is built, you can try and test it. For that you'll need
|
||||
to make an ISO image with grub:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir -p image/boot/grub
|
||||
cat >image/boot/grub/grub.cfg <<EOF
|
||||
menuentry "yggdrasil" {
|
||||
multiboot /boot/loader
|
||||
module /boot/kernel kernel
|
||||
}
|
||||
EOF
|
||||
cp <kernel sources>/build/loader.elf image/boot/loader
|
||||
cp <kernel sources>/build/kernel.elf image/boot/kernel
|
||||
grub-mkrescue -o image.iso image
|
||||
|
||||
Then, you can boot the image using qemu:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
qemu-system-x86_64 -cdrom image.iso -serial stdio
|
||||
|
||||
Don't panic when you see "fatal error", that happens because we haven't yet
|
||||
built any initial ramdisk for kernel to run /init from:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# This is absolutely okay:
|
||||
[00000002 user_init_func] Starting user init
|
||||
[00000002 user_init_func] ram0: No such file or directory
|
||||
[00000003 panicf] --- Panic ---
|
||||
[user_init_func] Fail
|
||||
[00000003 panicf] --- Panic ---
|
||||
|
||||
Once the kernel is built and verified to boot, you should install headers into
|
||||
your toolchain prefix so libc can be built:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
cd <kernel sources>
|
||||
./install-hdr.sh
|
||||
|
||||
4. Building newlib
|
||||
------------------
|
||||
|
||||
Before starting with building newlib, I recommend making an "environment" file for
|
||||
further use here, too:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
# For x86_64-elf-yggdrasil- toolchain
|
||||
export PATH="<toolchain prefix>/bin:$PATH"
|
||||
# For old autotools
|
||||
export PATH="<old autotools>/bin:$PATH"
|
||||
|
||||
A separate environment file is recommended, because it has older autotools which
|
||||
may conflict with autotools used for building other parts (non-newlib).
|
||||
|
||||
After setting up the environment, run:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir newlib-build
|
||||
cd newlib-build
|
||||
<newlib sources>/configure \
|
||||
--prefix=<toolchain prefix> \
|
||||
--target=x86_64-elf-yggdrasil
|
||||
make && make install
|
||||
|
||||
Once this is completed, you're ready to build userspace binaries for yggdrasil.
|
||||
|
||||
5. Building the userspace
|
||||
-------------------------
|
||||
|
||||
The userspace is built by simply running ``make`` in "userspace" source directory:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
cd <userspace sources>
|
||||
make
|
||||
|
||||
The result of these commands is ``<userspace sources>/build/initrd.img`` file, which is
|
||||
used as initial ramdisk for the operating system.
|
||||
|
||||
6. Making the final image and testing
|
||||
-------------------------------------
|
||||
|
||||
The final OS image is built by combining all the userspace+kernel parts and is similar
|
||||
to how the bare kernel was tested first:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir -p image/boot/grub
|
||||
cat >image/boot/grub/grub.cfg <<EOF
|
||||
menuentry "yggdrasil" {
|
||||
multiboot /boot/loader
|
||||
module /boot/kernel kernel
|
||||
module /boot/initrd.img initrd
|
||||
}
|
||||
EOF
|
||||
cp <kernel sources>/build/loader.elf image/boot/loader
|
||||
cp <kernel sources>/build/kernel.elf image/boot/kernel
|
||||
cp <userspace sources>/build/initrd.img image/boot/initrd.img
|
||||
grub-mkrescue -o image.iso image
|
||||
|
||||
Finally, the resulting image can be booted using qemu (or you can try running it
|
||||
on your PC, I'd appreciate the feedback from running it on actual hardware):
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
qemu-system-x86_64 -cdrom image.iso -serial stdio
|
||||
|
||||
Once the system boots up, you should see the login prompt, where you can type the
|
||||
combination of ``root`` and ``toor`` to enter the shell as root.
|
||||
|
||||
*Congratulations! You've successfully completed the quest of manually building
|
||||
yggdrasil OS.*
|
||||
@@ -10,6 +10,7 @@ yggdrasil kernel documentation
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
building.rst
|
||||
sys/mem.rst
|
||||
dev/pci.rst
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,361 @@
|
||||
From b446bb281363afcdf926dc8616a0a05a8c563d78 Mon Sep 17 00:00:00 2001
|
||||
From: Mark <alnyan@airmail.cc>
|
||||
Date: Tue, 7 Apr 2020 21:02:23 +0300
|
||||
Subject: [PATCH] Add x86_64-elf-yggdrasil target
|
||||
|
||||
---
|
||||
bfd/config.bfd | 5 +++
|
||||
config.sub | 3 +-
|
||||
gas/configure.tgt | 9 ++--
|
||||
ld/Makefile.am | 1 +
|
||||
ld/Makefile.in | 64 ++++++++++++++-------------
|
||||
ld/configure.tgt | 4 ++
|
||||
ld/emulparams/elf_x86_64.sh | 0
|
||||
ld/emulparams/elf_x86_64_yggdrasil.sh | 3 ++
|
||||
8 files changed, 53 insertions(+), 36 deletions(-)
|
||||
mode change 100644 => 100755 ld/emulparams/elf_x86_64.sh
|
||||
create mode 100644 ld/emulparams/elf_x86_64_yggdrasil.sh
|
||||
|
||||
diff --git a/bfd/config.bfd b/bfd/config.bfd
|
||||
index 13d678e1f8..5ac2f04dae 100644
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -220,6 +220,11 @@ esac
|
||||
case "${targ}" in
|
||||
# START OF targmatch.h
|
||||
#ifdef BFD64
|
||||
+ x86_64-*-yggdrasil*)
|
||||
+ targ_defvec=x86_64_elf64_vec
|
||||
+ targ_selvecs=""
|
||||
+ want64=true
|
||||
+ ;;
|
||||
aarch64-*-darwin*)
|
||||
targ_defvec=aarch64_mach_o_vec
|
||||
targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
|
||||
diff --git a/config.sub b/config.sub
|
||||
index 5b158ac41c..6ac1a13c72 100755
|
||||
--- a/config.sub
|
||||
+++ b/config.sub
|
||||
@@ -1368,7 +1368,8 @@ case $os in
|
||||
| powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
|
||||
| skyos* | haiku* | rdos* | toppers* | drops* | es* \
|
||||
| onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
|
||||
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*)
|
||||
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
|
||||
+ | yggdrasil*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
qnx*)
|
||||
diff --git a/gas/configure.tgt b/gas/configure.tgt
|
||||
index a4828c4cae..8990b5b576 100644
|
||||
--- a/gas/configure.tgt
|
||||
+++ b/gas/configure.tgt
|
||||
@@ -6,12 +6,12 @@
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
-#
|
||||
+#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
-#
|
||||
+#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
@@ -121,6 +121,7 @@ esac
|
||||
generic_target=${cpu_type}-$vendor-$os
|
||||
# Note: This table is alpha-sorted, please try to keep it that way.
|
||||
case ${generic_target} in
|
||||
+ i386-*-yggdrasil*) fmt=elf;;
|
||||
aarch64*-*-elf*) fmt=elf;;
|
||||
aarch64*-*-fuchsia*) fmt=elf;;
|
||||
aarch64*-*-linux*) fmt=elf em=linux
|
||||
@@ -326,7 +327,7 @@ case ${generic_target} in
|
||||
moxie-*-uclinux) fmt=elf em=linux ;;
|
||||
moxie-*-moxiebox*) fmt=elf endian=little ;;
|
||||
moxie-*-*) fmt=elf ;;
|
||||
-
|
||||
+
|
||||
mt-*-elf) fmt=elf bfd_gas=yes ;;
|
||||
|
||||
msp430-*-*) fmt=elf ;;
|
||||
@@ -414,7 +415,7 @@ case ${generic_target} in
|
||||
wasm32-*-*) fmt=elf ;;
|
||||
|
||||
xstormy16-*-*) fmt=elf ;;
|
||||
-
|
||||
+
|
||||
xgate-*-*) fmt=elf ;;
|
||||
|
||||
xtensa*-*-*) fmt=elf ;;
|
||||
diff --git a/ld/Makefile.am b/ld/Makefile.am
|
||||
index 0509c2e50f..16dc33e8a3 100644
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -386,6 +386,7 @@ ALL_EMULATION_SOURCES = \
|
||||
ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@)
|
||||
|
||||
ALL_64_EMULATION_SOURCES = \
|
||||
+ eelf_x86_64_yggdrasil.c \
|
||||
eaarch64elf.c \
|
||||
eaarch64elf32.c \
|
||||
eaarch64elfb.c \
|
||||
diff --git a/ld/Makefile.in b/ld/Makefile.in
|
||||
index 9898392a77..900604f236 100644
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -144,7 +144,7 @@ libldtestplug_la_OBJECTS = $(am_libldtestplug_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
-am__v_lt_1 =
|
||||
+am__v_lt_1 =
|
||||
libldtestplug_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||
$(libldtestplug_la_CFLAGS) $(CFLAGS) \
|
||||
@@ -196,11 +196,11 @@ am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
-am__v_GEN_1 =
|
||||
+am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
-am__v_at_1 =
|
||||
+am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/../depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@@ -214,7 +214,7 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
-am__v_CC_1 =
|
||||
+am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
@@ -222,7 +222,7 @@ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
-am__v_CCLD_1 =
|
||||
+am__v_CCLD_1 =
|
||||
@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
|
||||
LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
|
||||
LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
|
||||
@@ -230,7 +230,7 @@ LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
|
||||
AM_V_LEX = $(am__v_LEX_@AM_V@)
|
||||
am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
|
||||
am__v_LEX_0 = @echo " LEX " $@;
|
||||
-am__v_LEX_1 =
|
||||
+am__v_LEX_1 =
|
||||
YLWRAP = $(top_srcdir)/../ylwrap
|
||||
@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
|
||||
am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
|
||||
@@ -241,38 +241,38 @@ LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
|
||||
AM_V_YACC = $(am__v_YACC_@AM_V@)
|
||||
am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
|
||||
am__v_YACC_0 = @echo " YACC " $@;
|
||||
-am__v_YACC_1 =
|
||||
+am__v_YACC_1 =
|
||||
SOURCES = $(libldtestplug_la_SOURCES) $(libldtestplug2_la_SOURCES) \
|
||||
$(libldtestplug3_la_SOURCES) $(libldtestplug4_la_SOURCES) \
|
||||
$(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
|
||||
AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
|
||||
am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
|
||||
am__v_DVIPS_0 = @echo " DVIPS " $@;
|
||||
-am__v_DVIPS_1 =
|
||||
+am__v_DVIPS_1 =
|
||||
AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
|
||||
am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
|
||||
am__v_MAKEINFO_0 = @echo " MAKEINFO" $@;
|
||||
-am__v_MAKEINFO_1 =
|
||||
+am__v_MAKEINFO_1 =
|
||||
AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
|
||||
am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
|
||||
am__v_INFOHTML_0 = @echo " INFOHTML" $@;
|
||||
-am__v_INFOHTML_1 =
|
||||
+am__v_INFOHTML_1 =
|
||||
AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
|
||||
am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
|
||||
am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@;
|
||||
-am__v_TEXI2DVI_1 =
|
||||
+am__v_TEXI2DVI_1 =
|
||||
AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
|
||||
am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
|
||||
am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@;
|
||||
-am__v_TEXI2PDF_1 =
|
||||
+am__v_TEXI2PDF_1 =
|
||||
AM_V_texinfo = $(am__v_texinfo_@AM_V@)
|
||||
am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
|
||||
am__v_texinfo_0 = -q
|
||||
-am__v_texinfo_1 =
|
||||
+am__v_texinfo_1 =
|
||||
AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
|
||||
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
|
||||
am__v_texidevnull_0 = > /dev/null
|
||||
-am__v_texidevnull_1 =
|
||||
+am__v_texidevnull_1 =
|
||||
INFO_DEPS = ld.info
|
||||
am__TEXINFO_TEX_DIR = $(srcdir)/../texinfo
|
||||
DVIS = ld.dvi
|
||||
@@ -542,22 +542,22 @@ tooldir = $(exec_prefix)/$(target_alias)
|
||||
|
||||
# Automake 1.10+ disables lex and yacc output file regeneration if
|
||||
# maintainer mode is disabled. Avoid this.
|
||||
-am__skiplex =
|
||||
-am__skipyacc =
|
||||
+am__skiplex =
|
||||
+am__skipyacc =
|
||||
ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
|
||||
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
|
||||
-DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
|
||||
|
||||
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
-@ENABLE_PLUGINS_FALSE@PLUGIN_C =
|
||||
+@ENABLE_PLUGINS_FALSE@PLUGIN_C =
|
||||
|
||||
# Conditionally enable the plugin interface.
|
||||
@ENABLE_PLUGINS_TRUE@PLUGIN_C = plugin.c
|
||||
-@ENABLE_PLUGINS_FALSE@PLUGIN_H =
|
||||
+@ENABLE_PLUGINS_FALSE@PLUGIN_H =
|
||||
@ENABLE_PLUGINS_TRUE@PLUGIN_H = plugin.h
|
||||
-@ENABLE_PLUGINS_FALSE@PLUGIN_OBJECT =
|
||||
+@ENABLE_PLUGINS_FALSE@PLUGIN_OBJECT =
|
||||
@ENABLE_PLUGINS_TRUE@PLUGIN_OBJECT = plugin.@OBJEXT@
|
||||
-@ENABLE_PLUGINS_FALSE@PLUGIN_CFLAGS =
|
||||
+@ENABLE_PLUGINS_FALSE@PLUGIN_CFLAGS =
|
||||
@ENABLE_PLUGINS_TRUE@PLUGIN_CFLAGS = -DENABLE_PLUGINS
|
||||
|
||||
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
||||
@@ -581,7 +581,7 @@ POD2MAN = pod2man --center="GNU Development Tools" \
|
||||
# Setup the testing framework, if you have one
|
||||
EXPECT = expect
|
||||
RUNTEST = runtest
|
||||
-RUNTESTFLAGS =
|
||||
+RUNTESTFLAGS =
|
||||
CC_FOR_TARGET = ` \
|
||||
if [ -f $$r/../gcc/xgcc ] ; then \
|
||||
if [ -f $$r/../newlib/Makefile ] ; then \
|
||||
@@ -872,6 +872,7 @@ ALL_EMULATION_SOURCES = \
|
||||
|
||||
ALL_EMULATIONS = $(ALL_EMULATION_SOURCES:.c=.@OBJEXT@)
|
||||
ALL_64_EMULATION_SOURCES = \
|
||||
+ eelf_x86_64_yggdrasil.c \
|
||||
eaarch64elf.c \
|
||||
eaarch64elf32.c \
|
||||
eaarch64elfb.c \
|
||||
@@ -982,7 +983,7 @@ OFILES = ldgram.@OBJEXT@ ldlex-wrapper.@OBJEXT@ lexsup.@OBJEXT@ ldlang.@OBJEXT@
|
||||
STAGESTUFF = *.@OBJEXT@ ldscripts/* e*.c
|
||||
SRC_POTFILES = $(CFILES) $(HFILES)
|
||||
BLD_POTFILES = $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES)
|
||||
-@AMDEP_FALSE@GENDEPDIR =
|
||||
+@AMDEP_FALSE@GENDEPDIR =
|
||||
@AMDEP_TRUE@GENDEPDIR = $(DEPDIR)
|
||||
GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "$(GENDEPDIR)" "${LIB_PATH}" "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@ @enable_initfini_array@
|
||||
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
|
||||
@@ -1085,7 +1086,7 @@ config.h: stamp-h1
|
||||
stamp-h1: $(srcdir)/config.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
-$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
+$(srcdir)/config.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
@@ -1106,16 +1107,16 @@ clean-noinstLTLIBRARIES:
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
-libldtestplug.la: $(libldtestplug_la_OBJECTS) $(libldtestplug_la_DEPENDENCIES) $(EXTRA_libldtestplug_la_DEPENDENCIES)
|
||||
+libldtestplug.la: $(libldtestplug_la_OBJECTS) $(libldtestplug_la_DEPENDENCIES) $(EXTRA_libldtestplug_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libldtestplug_la_LINK) $(am_libldtestplug_la_rpath) $(libldtestplug_la_OBJECTS) $(libldtestplug_la_LIBADD) $(LIBS)
|
||||
|
||||
-libldtestplug2.la: $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_DEPENDENCIES) $(EXTRA_libldtestplug2_la_DEPENDENCIES)
|
||||
+libldtestplug2.la: $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_DEPENDENCIES) $(EXTRA_libldtestplug2_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libldtestplug2_la_LINK) $(am_libldtestplug2_la_rpath) $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_LIBADD) $(LIBS)
|
||||
|
||||
-libldtestplug3.la: $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_DEPENDENCIES) $(EXTRA_libldtestplug3_la_DEPENDENCIES)
|
||||
+libldtestplug3.la: $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_DEPENDENCIES) $(EXTRA_libldtestplug3_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libldtestplug3_la_LINK) $(am_libldtestplug3_la_rpath) $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_LIBADD) $(LIBS)
|
||||
|
||||
-libldtestplug4.la: $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_DEPENDENCIES) $(EXTRA_libldtestplug4_la_DEPENDENCIES)
|
||||
+libldtestplug4.la: $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_DEPENDENCIES) $(EXTRA_libldtestplug4_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libldtestplug4_la_LINK) $(am_libldtestplug4_la_rpath) $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_LIBADD) $(LIBS)
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@@ -1173,7 +1174,7 @@ deffilep.h: deffilep.c
|
||||
@if test ! -f $@; then rm -f deffilep.c; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) deffilep.c; else :; fi
|
||||
|
||||
-ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES) $(EXTRA_ld_new_DEPENDENCIES)
|
||||
+ld-new$(EXEEXT): $(ld_new_OBJECTS) $(ld_new_DEPENDENCIES) $(EXTRA_ld_new_DEPENDENCIES)
|
||||
@rm -f ld-new$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(ld_new_OBJECTS) $(ld_new_LDADD) $(LIBS)
|
||||
|
||||
@@ -1594,19 +1595,19 @@ ld.info: ld.texi $(ld_TEXINFOS)
|
||||
fi; \
|
||||
rm -rf $$backupdir; exit $$rc
|
||||
|
||||
-ld.dvi: ld.texi $(ld_TEXINFOS)
|
||||
+ld.dvi: ld.texi $(ld_TEXINFOS)
|
||||
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
|
||||
`test -f 'ld.texi' || echo '$(srcdir)/'`ld.texi
|
||||
|
||||
-ld.pdf: ld.texi $(ld_TEXINFOS)
|
||||
+ld.pdf: ld.texi $(ld_TEXINFOS)
|
||||
$(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
|
||||
`test -f 'ld.texi' || echo '$(srcdir)/'`ld.texi
|
||||
|
||||
-ld.html: ld.texi $(ld_TEXINFOS)
|
||||
+ld.html: ld.texi $(ld_TEXINFOS)
|
||||
$(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
|
||||
$(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $(@:.html=.htp) `test -f 'ld.texi' || echo '$(srcdir)/'`ld.texi; \
|
||||
@@ -2540,6 +2541,7 @@ $(ALL_EMULATION_SOURCES) $(ALL_64_EMULATION_SOURCES): $(GEN_DEPENDS)
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_l1om_fbsd.Pc@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om.Pc@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_k1om_fbsd.Pc@am__quote@
|
||||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_yggdrasil.Pc@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64.Pc@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_cloudabi.Pc@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_x86_64_fbsd.Pc@am__quote@
|
||||
diff --git a/ld/configure.tgt b/ld/configure.tgt
|
||||
index c81bc8a7d8..94ac8117be 100644
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -45,6 +45,10 @@ targ64_extra_libpath=
|
||||
# architecture variants should be kept together even if their names
|
||||
# break the alpha sorting.
|
||||
case "${targ}" in
|
||||
+x86_64-*-yggdrasil*)
|
||||
+ targ_emul=elf_x86_64_yggdrasil
|
||||
+ targ_extra_emuls=elf_x86_64
|
||||
+ ;;
|
||||
aarch64_be-*-elf) targ_emul=aarch64elfb
|
||||
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf" ;;
|
||||
aarch64-*-elf | aarch64-*-rtems*)
|
||||
diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
diff --git a/ld/emulparams/elf_x86_64_yggdrasil.sh b/ld/emulparams/elf_x86_64_yggdrasil.sh
|
||||
new file mode 100644
|
||||
index 0000000000..cf15ddbfdf
|
||||
--- /dev/null
|
||||
+++ b/ld/emulparams/elf_x86_64_yggdrasil.sh
|
||||
@@ -0,0 +1,3 @@
|
||||
+#!/bin/sh
|
||||
+. ${srcdir}/emulparams/elf_x86_64.sh
|
||||
+TEXT_START_ADDR=0x400000
|
||||
--
|
||||
2.24.1
|
||||
|
||||
+47
-48
@@ -1,22 +1,22 @@
|
||||
From 88356e3e55f393cbdd0fe8aa8df4e2bc42d9bcf2 Mon Sep 17 00:00:00 2001
|
||||
From 38ba77f44914562663b0eebfd317c844a6e094cf Mon Sep 17 00:00:00 2001
|
||||
From: Mark <alnyan@airmail.cc>
|
||||
Date: Tue, 14 Jan 2020 21:09:17 +0200
|
||||
Subject: [PATCH] Add yggdrasil support
|
||||
Date: Tue, 7 Apr 2020 21:51:12 +0300
|
||||
Subject: [PATCH] Add x86_64-elf-yggdrasil target
|
||||
|
||||
---
|
||||
config.sub | 2 +-
|
||||
fixincludes/mkfixinc.sh | 1 +
|
||||
gcc/config.gcc | 12 +++++++++++-
|
||||
gcc/config/i386/t-yggdrasil | 2 ++
|
||||
gcc/config/yggdrasil.h | 25 +++++++++++++++++++++++++
|
||||
gcc/config/yggdrasil.h | 23 +++++++++++++++++++++++
|
||||
libgcc/config.host | 8 ++++++--
|
||||
libstdc++-v3/crossconfig.m4 | 12 +++++++++---
|
||||
7 files changed, 55 insertions(+), 7 deletions(-)
|
||||
libstdc++-v3/crossconfig.m4 | 13 ++++++++++---
|
||||
7 files changed, 54 insertions(+), 7 deletions(-)
|
||||
create mode 100644 gcc/config/i386/t-yggdrasil
|
||||
create mode 100644 gcc/config/yggdrasil.h
|
||||
|
||||
diff --git a/config.sub b/config.sub
|
||||
index 75bb6a3135b..30ccfb885b4 100755
|
||||
index 75bb6a313..30ccfb885 100755
|
||||
--- a/config.sub
|
||||
+++ b/config.sub
|
||||
@@ -1363,7 +1363,7 @@ case $os in
|
||||
@@ -29,7 +29,7 @@ index 75bb6a3135b..30ccfb885b4 100755
|
||||
;;
|
||||
qnx*)
|
||||
diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
|
||||
index 0f9648608e9..f37044f11cd 100755
|
||||
index 0f9648608..f37044f11 100755
|
||||
--- a/fixincludes/mkfixinc.sh
|
||||
+++ b/fixincludes/mkfixinc.sh
|
||||
@@ -11,6 +11,7 @@ target=fixinc.sh
|
||||
@@ -41,7 +41,7 @@ index 0f9648608e9..f37044f11cd 100755
|
||||
i?86-*-mingw32* | \
|
||||
x86_64-*-mingw32* | \
|
||||
diff --git a/gcc/config.gcc b/gcc/config.gcc
|
||||
index ddd3b8f4d9d..3470beec1bb 100644
|
||||
index ddd3b8f4d..950f7ff65 100644
|
||||
--- a/gcc/config.gcc
|
||||
+++ b/gcc/config.gcc
|
||||
@@ -180,7 +180,7 @@
|
||||
@@ -53,33 +53,33 @@ index ddd3b8f4d9d..3470beec1bb 100644
|
||||
# The default character to be used for formatting
|
||||
# the attribute in a
|
||||
# .type symbol_name, ${t_t_f_c}<property>
|
||||
@@ -776,6 +776,12 @@ case ${target} in
|
||||
*-*-fuchsia*)
|
||||
native_system_header_dir=/include
|
||||
;;
|
||||
@@ -675,6 +675,12 @@ x86_cpus="generic intel"
|
||||
|
||||
# Common parts for widely ported systems.
|
||||
case ${target} in
|
||||
+*-*-yggdrasil*)
|
||||
+ gas=yes
|
||||
+ gnu_ld=yes
|
||||
+ default_use_cxa_atexit=yes
|
||||
+ use_gcc_stdint=wrap
|
||||
+ ;;
|
||||
*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu)
|
||||
extra_options="$extra_options gnu-user.opt"
|
||||
gas=yes
|
||||
@@ -1743,6 +1749,10 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-gnu* | i[34567]8
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*-*-darwin*)
|
||||
tmake_file="t-darwin "
|
||||
tm_file="${tm_file} darwin.h"
|
||||
@@ -978,6 +984,10 @@ case ${target} in
|
||||
esac
|
||||
|
||||
case ${target} in
|
||||
+x86_64-*-yggdrasil*)
|
||||
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h yggdrasil.h"
|
||||
+ tmake_file="${tmake_file} t-yggdrasil"
|
||||
+ ;;
|
||||
x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
|
||||
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h glibc-stdint.h \
|
||||
i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h"
|
||||
aarch64*-*-elf | aarch64*-*-fuchsia* | aarch64*-*-rtems*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
|
||||
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
|
||||
diff --git a/gcc/config/i386/t-yggdrasil b/gcc/config/i386/t-yggdrasil
|
||||
new file mode 100644
|
||||
index 00000000000..8223e63c0c9
|
||||
index 000000000..8223e63c0
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/i386/t-yggdrasil
|
||||
@@ -0,0 +1,2 @@
|
||||
@@ -87,10 +87,10 @@ index 00000000000..8223e63c0c9
|
||||
+MULTILIB_DIRNAMES += no-red-zone
|
||||
diff --git a/gcc/config/yggdrasil.h b/gcc/config/yggdrasil.h
|
||||
new file mode 100644
|
||||
index 00000000000..5a9e4af5d5f
|
||||
index 000000000..db100d5e9
|
||||
--- /dev/null
|
||||
+++ b/gcc/config/yggdrasil.h
|
||||
@@ -0,0 +1,25 @@
|
||||
@@ -0,0 +1,23 @@
|
||||
+#undef TARGET_YGGDRASIL
|
||||
+#define TARGET_YGGDRASIL 1
|
||||
+
|
||||
@@ -100,9 +100,6 @@ index 00000000000..5a9e4af5d5f
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
|
||||
+
|
||||
+#undef STANDARD_STARTFILE_PREFIX
|
||||
+#define STANDARD_STARTFILE_PREFIX "/home/alnyan/Programs/build/tmp/libc/"
|
||||
+
|
||||
+#undef ENDFILE_SPEC
|
||||
+#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
|
||||
+
|
||||
@@ -116,8 +113,9 @@ index 00000000000..5a9e4af5d5f
|
||||
+ builtin_assert("system=unix"); \
|
||||
+ builtin_assert("system=posix"); \
|
||||
+ } while (0);
|
||||
+
|
||||
diff --git a/libgcc/config.host b/libgcc/config.host
|
||||
index 91abc84da03..565db12aaae 100644
|
||||
index 91abc84da..565db12aa 100644
|
||||
--- a/libgcc/config.host
|
||||
+++ b/libgcc/config.host
|
||||
@@ -103,7 +103,7 @@ arm*-*-*)
|
||||
@@ -150,10 +148,24 @@ index 91abc84da03..565db12aaae 100644
|
||||
tmake_file="$tmake_file m32r/t-m32r t-fdpbit"
|
||||
extra_parts="$extra_parts crtinit.o crtfini.o"
|
||||
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
|
||||
index 344eec09d8e..7018aa504b8 100644
|
||||
index 344eec09d..6fb1a7e3c 100644
|
||||
--- a/libstdc++-v3/crossconfig.m4
|
||||
+++ b/libstdc++-v3/crossconfig.m4
|
||||
@@ -94,7 +94,7 @@ case "${host}" in
|
||||
@@ -5,6 +5,13 @@ dnl
|
||||
AC_DEFUN([GLIBCXX_CROSSCONFIG],[
|
||||
# Base decisions on target environment.
|
||||
case "${host}" in
|
||||
+ *-yggdrasil*)
|
||||
+ GLIBCXX_CHECK_COMPILER_FEATURES
|
||||
+ GLIBCXX_CHECK_LINKER_FEATURES
|
||||
+ GLIBCXX_CHECK_MATH_SUPPORT
|
||||
+ GLIBCXX_CHECK_STDLIB_SUPPORT
|
||||
+ ;;
|
||||
+
|
||||
arm*-*-symbianelf*)
|
||||
# This is a freestanding configuration; there is nothing to do here.
|
||||
;;
|
||||
@@ -94,7 +101,7 @@ case "${host}" in
|
||||
|
||||
*-freebsd*)
|
||||
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
||||
@@ -162,20 +174,7 @@ index 344eec09d8e..7018aa504b8 100644
|
||||
GLIBCXX_CHECK_LINKER_FEATURES
|
||||
AC_DEFINE(HAVE_SETENV)
|
||||
AC_DEFINE(HAVE_FINITEF)
|
||||
@@ -186,6 +186,12 @@ case "${host}" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
+ *-yggdrasil*)
|
||||
+ GLIBCXX_CHECK_COMPILER_FEATURES
|
||||
+ GLIBCXX_CHECK_LINKER_FEATURES
|
||||
+ GLIBCXX_CHECK_MATH_SUPPORT
|
||||
+ GLIBCXX_CHECK_STDLIB_SUPPORT
|
||||
+ ;;
|
||||
*-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-cygwin* | *-solaris*)
|
||||
GLIBCXX_CHECK_COMPILER_FEATURES
|
||||
GLIBCXX_CHECK_LINKER_FEATURES
|
||||
@@ -209,7 +215,7 @@ case "${host}" in
|
||||
@@ -209,7 +216,7 @@ case "${host}" in
|
||||
;;
|
||||
*-netbsd* | *-openbsd*)
|
||||
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
||||
@@ -184,7 +183,7 @@ index 344eec09d8e..7018aa504b8 100644
|
||||
GLIBCXX_CHECK_LINKER_FEATURES
|
||||
AC_DEFINE(HAVE_FINITEF)
|
||||
AC_DEFINE(HAVE_FINITE)
|
||||
@@ -230,7 +236,7 @@ case "${host}" in
|
||||
@@ -230,7 +237,7 @@ case "${host}" in
|
||||
;;
|
||||
*-qnx6.1* | *-qnx6.2*)
|
||||
SECTION_FLAGS='-ffunction-sections -fdata-sections'
|
||||
@@ -194,5 +193,5 @@ index 344eec09d8e..7018aa504b8 100644
|
||||
AC_DEFINE(HAVE_COSF)
|
||||
AC_DEFINE(HAVE_COSL)
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
||||
Reference in New Issue
Block a user