mirror of
https://review.haiku-os.org/buildtools
synced 2026-02-04 16:03:15 +01:00
Compare commits
6 Commits
r1beta1
...
btrev43141
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c162732461 | ||
|
|
fb78ddf2aa | ||
|
|
db2fd1989f | ||
|
|
fd2fd983c5 | ||
|
|
abcbee7bba | ||
|
|
198e0fde5e |
@@ -1724,7 +1724,7 @@ case "${targ}" in
|
||||
targ_selvecs="sparc_elf32_vec sparc_aout_linux_vec sparc_aout_sunos_be_vec"
|
||||
want64=true
|
||||
;;
|
||||
sparc64-*-elf* | sparc64-*-rtems* )
|
||||
sparc64-*-elf* | sparc64-*-rtems* | sparc64-*-haiku*)
|
||||
targ_defvec=sparc_elf64_vec
|
||||
targ_selvecs=sparc_elf32_vec
|
||||
want64=true
|
||||
|
||||
@@ -433,6 +433,7 @@ case ${generic_target} in
|
||||
sh64-*-elf*) fmt=elf ;;
|
||||
|
||||
sparc64-*-rtems*) fmt=elf ;;
|
||||
sparc-*-haiku*) fmt=elf em=haiku ;;
|
||||
sparc-*-rtems*) fmt=elf ;;
|
||||
sparc-*-sunos4*) fmt=aout em=sun3 ;;
|
||||
sparc-*-aout) fmt=aout em=sparcaout ;;
|
||||
|
||||
@@ -769,6 +769,7 @@ sh64-*-elf*) targ_emul=shelf
|
||||
sparc64-*-aout*) targ_emul=sparcaout ;;
|
||||
sparc64-*-elf*) targ_emul=elf64_sparc ;;
|
||||
sparc64-*-rtems*) targ_emul=elf64_sparc ;;
|
||||
sparc64-*-haiku*) targ_emul=elf64_sparc ;;
|
||||
sparc-sun-sunos4*) targ_emul=sun4 ;;
|
||||
sparclite*-*-elf) targ_emul=elf32_sparc ;;
|
||||
sparclite*-*-coff) targ_emul=coff_sparc ;;
|
||||
|
||||
@@ -2068,6 +2068,12 @@ microblaze*-*-elf)
|
||||
cxx_target_objs="${cxx_target_objs} microblaze-c.o"
|
||||
tmake_file="${tmake_file} microblaze/t-microblaze"
|
||||
;;
|
||||
riscv*-*-haiku*)
|
||||
tm_file="elfos.h haiku.h ${tm_file} riscv/haiku.h"
|
||||
tmake_file="${tmake_file} t-haiku riscv/t-riscv riscv/t-haiku"
|
||||
gnu_ld=yes
|
||||
gas=yes
|
||||
;;
|
||||
riscv*-*-linux*)
|
||||
tm_file="elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} riscv/linux.h"
|
||||
case "x${enable_multilib}" in
|
||||
@@ -2939,6 +2945,11 @@ sparc64-*-rtems*)
|
||||
extra_options="${extra_options}"
|
||||
tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems-64"
|
||||
;;
|
||||
sparc64-*-haiku*)
|
||||
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp64-elf.h haiku.h sparc/haiku.h"
|
||||
extra_options="${extra_options}"
|
||||
tmake_file="${tmake_file} t-haiku sparc/t-sparc sparc/t-haiku"
|
||||
;;
|
||||
sparc64-*-linux*)
|
||||
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/default64.h sparc/linux64.h sparc/tso.h"
|
||||
extra_options="${extra_options} sparc/long-double-switch.opt"
|
||||
|
||||
54
gcc/gcc/config/riscv/haiku.h
Normal file
54
gcc/gcc/config/riscv/haiku.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* Definitions for RISC-V Haiku systems with ELF format.
|
||||
Copyright (C) 1998-2017 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC 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 GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#undef TARGET_OS_CPP_BUILTINS
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define ("__HAIKU__"); \
|
||||
if (POINTER_SIZE == 64) \
|
||||
builtin_define ("__riscv64__"); \
|
||||
else \
|
||||
builtin_define ("__riscv32__"); \
|
||||
builtin_define ("__RISCV__"); \
|
||||
builtin_define ("__riscv__"); \
|
||||
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
|
||||
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
|
||||
builtin_define ("__STDC_ISO_10646__=201103L"); \
|
||||
builtin_assert ("system=haiku"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#define MUSL_ABI_SUFFIX \
|
||||
"%{mabi=ilp32:-sf}" \
|
||||
"%{mabi=ilp32f:-sp}" \
|
||||
"%{mabi=ilp32d:}" \
|
||||
"%{mabi=lp64:-sf}" \
|
||||
"%{mabi=lp64f:-sp}" \
|
||||
"%{mabi=lp64d:}" \
|
||||
|
||||
/* Because RISC-V only has word-sized atomics, it requries libatomic where
|
||||
others do not. So link libatomic by default, as needed. */
|
||||
#undef LIB_SPEC
|
||||
#define LIB_SPEC " -lroot -latomic "
|
||||
|
||||
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "%{!o*:-o %b} -melf" XLEN_SPEC "lriscv %{!r:-shared} %{nostart:-e 0} %{shared:-e 0} %{!shared: %{!nostart: -no-undefined}} -X"
|
||||
4
gcc/gcc/config/riscv/t-haiku
Normal file
4
gcc/gcc/config/riscv/t-haiku
Normal file
@@ -0,0 +1,4 @@
|
||||
# Disable for now, only RV64 on Haiku for the moment
|
||||
# Only XLEN and ABI affect multilib dir names, e.g. /lib32/ilp32d/
|
||||
#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES)))
|
||||
#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
|
||||
93
gcc/gcc/config/sparc/haiku.h
Normal file
93
gcc/gcc/config/sparc/haiku.h
Normal file
@@ -0,0 +1,93 @@
|
||||
/* Definitions of target machine for GCC, for ELF on Haiku/sparc64.
|
||||
Copyright (C) 2002-2017 Free Software Foundation, Inc.
|
||||
Contributed by Matthew Green (mrg@eterna.com.au).
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
GCC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GCC 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 GCC; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#define TARGET_OS_CPP_BUILTINS() \
|
||||
do \
|
||||
{ \
|
||||
builtin_define ("__HAIKU__"); \
|
||||
if (TARGET_ARCH64) \
|
||||
{ \
|
||||
builtin_define ("__sparc64__"); \
|
||||
builtin_define ("__sparc_v9__"); \
|
||||
builtin_define ("__sparcv9"); \
|
||||
} \
|
||||
else \
|
||||
builtin_define ("__sparc"); \
|
||||
builtin_define ("__sparc__"); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* Provide a LINK_SPEC appropriate for Haiku. Here we provide support
|
||||
for the special GCC options -static and -shared, which allow us to
|
||||
link things in one of these three modes by applying the appropriate
|
||||
combinations of options at link-time. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC "-m elf64_sparc %{!r:-shared} %{nostart:-e 0} \
|
||||
%{shared:-e 0} %{!shared: %{!nostart: -no-undefined}}"
|
||||
/* SIZE_TYPE and PTRDIFF_TYPE are wrong from sparc/sparc.h. */
|
||||
#undef SIZE_TYPE
|
||||
#define SIZE_TYPE "long unsigned int"
|
||||
|
||||
#undef PTRDIFF_TYPE
|
||||
#define PTRDIFF_TYPE "long int"
|
||||
|
||||
/* This is the char to use for continuation (in case we need to turn
|
||||
continuation back on). */
|
||||
#undef DBX_CONTIN_CHAR
|
||||
#define DBX_CONTIN_CHAR '?'
|
||||
|
||||
#undef LOCAL_LABEL_PREFIX
|
||||
#define LOCAL_LABEL_PREFIX "."
|
||||
|
||||
/* This is how to store into the string LABEL
|
||||
the symbol_ref name of an internal numbered label where
|
||||
PREFIX is the class of label and NUM is the number within the class.
|
||||
This is suitable for output with `assemble_name'. */
|
||||
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
|
||||
sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
|
||||
|
||||
#undef USER_LABEL_PREFIX
|
||||
#define USER_LABEL_PREFIX ""
|
||||
|
||||
#undef ASM_SPEC
|
||||
#define ASM_SPEC "%{" FPIE_OR_FPIC_SPEC ":-K PIC} \
|
||||
%(asm_cpu) %(asm_arch) %(asm_relax)"
|
||||
|
||||
#define HAVE_ENABLE_EXECUTE_STACK
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT \
|
||||
(MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ \
|
||||
+ MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
|
||||
|
||||
#undef SPARC_DEFAULT_CMODEL
|
||||
#define SPARC_DEFAULT_CMODEL CM_MEDANY
|
||||
|
||||
/* Build a compiler that supports -m32 and -m64? */
|
||||
|
||||
#undef LONG_DOUBLE_TYPE_SIZE
|
||||
#define LONG_DOUBLE_TYPE_SIZE 128
|
||||
|
||||
/* We use GNU ld so undefine this so that attribute((init_priority)) works. */
|
||||
#undef CTORS_SECTION_ASM_OP
|
||||
#undef DTORS_SECTION_ASM_OP
|
||||
5
gcc/gcc/config/sparc/t-haiku
Normal file
5
gcc/gcc/config/sparc/t-haiku
Normal file
@@ -0,0 +1,5 @@
|
||||
# Disable multilib for now, as we don't intend to support SPARC32.
|
||||
#MULTILIB_OPTIONS = m32/m64
|
||||
#MULTILIB_DIRNAMES = 32 64
|
||||
#MULTILIB_MATCHES =
|
||||
|
||||
@@ -1276,6 +1276,8 @@ sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux
|
||||
fi
|
||||
md_unwind_header=sparc/linux-unwind.h
|
||||
;;
|
||||
sparc64-*-haiku*)
|
||||
;;
|
||||
sparc64-*-netbsd*)
|
||||
;;
|
||||
spu-*-elf*)
|
||||
|
||||
19
gcc/mpfr/configure
vendored
19
gcc/mpfr/configure
vendored
@@ -13399,16 +13399,17 @@ fi
|
||||
|
||||
|
||||
# Check whether --enable-lto was given.
|
||||
enable_lto=no
|
||||
if test "${enable_lto+set}" = set; then :
|
||||
enableval=$enable_lto; case $enableval in
|
||||
yes) if test "$enable_shared" != "no"; then
|
||||
as_fn_error $? "--enable-lto can only work in static mode (--disable-shared)" "$LINENO" 5
|
||||
fi
|
||||
enable_lto=yes
|
||||
;;
|
||||
no) ;;
|
||||
*) as_fn_error $? "bad value for --enable-lto: yes or no" "$LINENO" 5 ;;
|
||||
esac
|
||||
# enableval=$enable_lto; case $enableval in
|
||||
# yes) if test "$enable_shared" != "no"; then
|
||||
# as_fn_error $? "--enable-lto can only work in static mode (--disable-shared)" "$LINENO" 5
|
||||
# fi
|
||||
# enable_lto=yes
|
||||
# ;;
|
||||
# no) ;;
|
||||
# *) as_fn_error $? "bad value for --enable-lto: yes or no" "$LINENO" 5 ;;
|
||||
# esac
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user