Verified Commit 11398f5b authored by Jeremy Soller's avatar Jeremy Soller Committed by Jeremy Soller

Add Redox support

parent 9fb89fa8
......@@ -12,6 +12,9 @@ target=fixinc.sh
# Check for special fix rules for particular targets
case $machine in
i?86-*-cygwin* | \
aarch64-*-redox* | \
i?86-*-redox* | \
x86_64-*-redox* | \
i?86-*-mingw32* | \
x86_64-*-mingw32* | \
powerpc-*-eabisim* | \
......
......@@ -3089,7 +3089,7 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
gcc_dir=`${PWD_COMMAND}` ; \
export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
cd $(build_objdir)/fixincludes && \
$(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
$(SHELL) -c true "$${gcc_dir}/$${fix_dir}" \
$(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
rm -f $${fix_dir}/syslimits.h; \
if [ -f $${fix_dir}/limits.h ]; then \
......
......@@ -83,5 +83,11 @@ case $build in
build_exeext=.exe
build_install_headers_dir=install-headers-cp
;;
i[34567]86-*-redox* | x86_64-*-redox* )
build_xm_file=i386/xm-redox.h
;;
aarch64-*-redox*)
build_xm_file=aarch64/xm-redox.h
;;
esac
......@@ -805,6 +805,19 @@ case ${target} in
tmake_file="${tmake_file} t-glibc"
target_has_targetcm=yes
;;
*-*-redox*)
gas=yes
gnu_ld=yes
default_use_cxa_atexit=yes
case ${target} in
i[34567]86-*-redox* | x86_64-*-redox*)
xm_file=i386/xm-redox.h
;;
aarch64-*-redox*)
xm_file=aarch64/xm-redox.h
;;
esac
;;
*-*-netbsd*)
tm_p_file="${tm_p_file} netbsd-protos.h"
tmake_file="t-netbsd t-slibgcc"
......@@ -1638,6 +1651,16 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu)
done
TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
;;
aarch64-*-redox*)
tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h"
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-elf-raw.h"
;;
i[34567]86-*-redox*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h redox.h newlib-stdint.h"
;;
x86_64-*-redox*)
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/x86-64.h redox.h newlib-stdint.h"
;;
i[34567]86-pc-msdosdjgpp*)
xm_file=i386/xm-djgpp.h
tm_file="dbxcoff.h ${tm_file} i386/unix.h i386/bsd.h i386/gas.h i386/djgpp.h i386/djgpp-stdint.h"
......
......@@ -293,4 +293,10 @@ case ${host} in
host_exeext=.exe
host_can_use_collect2=no
;;
i[34567]86-*-redox* | x86_64-*-redox*)
host_xm_file=i386/xm-redox.h
;;
aarch64-*-redox*)
host_xm_file=aarch64/xm-redox.h
;;
esac
#define HOST_BIT_BUCKET "null:"
#define PATH_SEPARATOR ';'
#define HOST_BIT_BUCKET "null:"
#define PATH_SEPARATOR ';'
#undef TARGET_REDOX
#define TARGET_REDOX 1
#undef LIB_SPEC
#define LIB_SPEC "-lc"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
#undef NO_IMPLICIT_EXTERN_C
#define NO_IMPLICIT_EXTERN_C 1
#undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \
do { \
builtin_define ("__redox__"); \
builtin_define ("__unix__"); \
builtin_assert ("system=redox"); \
builtin_assert ("system=unix"); \
builtin_assert ("system=posix"); \
} while(0);
......@@ -485,7 +485,7 @@ extern char *getwd (char *);
#endif
#if defined (HAVE_DECL_SBRK) && !HAVE_DECL_SBRK
extern void *sbrk (int);
extern void *sbrk (intptr_t);
#endif
#if defined (HAVE_DECL_SETENV) && !HAVE_DECL_SETENV
......
......@@ -663,6 +663,19 @@ x86_64-*-kfreebsd*-gnu)
tmake_file="${tmake_file} i386/t-crtpc t-crtfm i386/t-crtstuff t-dfprules"
tm_file="${tm_file} i386/elf-lib.h"
;;
i[34567]86-*-redox*)
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
;;
x86_64-*-redox*)
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
;;
aarch64-*-redox*)
extra_parts="$extra_parts crtbegin.o crtend.o crti.o crtn.o"
tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic"
md_unwind_header=aarch64/aarch64-unwind.h
;;
i[34567]86-pc-msdosdjgpp*)
;;
i[34567]86-*-lynxos*)
......
......@@ -86,7 +86,11 @@ relative prefix can be found, return @code{NULL}.
# endif
# define PATH_SEPARATOR ';'
#else
# define PATH_SEPARATOR ':'
# if defined (__redox__)
# define PATH_SEPARATOR ';'
# else
# define PATH_SEPARATOR ':'
# endif
#endif
#ifndef DIR_SEPARATOR_2
......
This diff is collapsed.
......@@ -194,6 +194,12 @@ case "${host}" in
AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
AM_ICONV
;;
*-redox*)
GLIBCXX_CHECK_COMPILER_FEATURES
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
GLIBCXX_CHECK_STDLIB_SUPPORT
;;
*-mingw32*)
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
......
......@@ -31,7 +31,7 @@
using std::new_handler;
using std::bad_alloc;
#if !_GLIBCXX_HAVE_ALIGNED_ALLOC
#if 0
#if _GLIBCXX_HAVE__ALIGNED_MALLOC
#define aligned_alloc(al,sz) _aligned_malloc(sz,al)
#elif _GLIBCXX_HAVE_POSIX_MEMALIGN
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment