From f1ea3026f964a68d193d7a7dc6baf74ec31a5fe8 Mon Sep 17 00:00:00 2001 From: milisbir Date: Sat, 3 Feb 2018 09:30:38 +0200 Subject: [PATCH] ct-aarch64-musl --- .../c/ct-aarch64-musl/0001-libgcc_s.patch | 56 +++ .../0005-libatomic-test-fix.patch | 179 ++++++++++ .../0006-libgomp-test-fix.patch | 44 +++ .../0007-libitm-test-fix.patch | 188 +++++++++++ .../0008-libvtv-test-fix.patch | 172 ++++++++++ .../genel/c/ct-aarch64-musl/mpfr-patch01 | 285 ++++++++++++++++ talimatname/genel/c/ct-aarch64-musl/talimat | 319 ++++++++++++++++++ 7 files changed, 1243 insertions(+) create mode 100644 talimatname/genel/c/ct-aarch64-musl/0001-libgcc_s.patch create mode 100644 talimatname/genel/c/ct-aarch64-musl/0005-libatomic-test-fix.patch create mode 100644 talimatname/genel/c/ct-aarch64-musl/0006-libgomp-test-fix.patch create mode 100644 talimatname/genel/c/ct-aarch64-musl/0007-libitm-test-fix.patch create mode 100644 talimatname/genel/c/ct-aarch64-musl/0008-libvtv-test-fix.patch create mode 100644 talimatname/genel/c/ct-aarch64-musl/mpfr-patch01 create mode 100644 talimatname/genel/c/ct-aarch64-musl/talimat diff --git a/talimatname/genel/c/ct-aarch64-musl/0001-libgcc_s.patch b/talimatname/genel/c/ct-aarch64-musl/0001-libgcc_s.patch new file mode 100644 index 000000000..103e4b5b7 --- /dev/null +++ b/talimatname/genel/c/ct-aarch64-musl/0001-libgcc_s.patch @@ -0,0 +1,56 @@ +From f09a0caf978b7aca4a95dd96bc0bdcd9016b933d Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 20 Aug 2016 21:16:00 +0000 +Subject: [PATCH 1/8] libgcc_s + +--- + gcc/config/i386/i386.c | 4 ++-- + libgcc/config/i386/cpuinfo.c | 6 +++--- + libgcc/config/i386/t-linux | 2 +- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 2639c8c..88c7ebe 100644 +--- a/gcc/config/i386/i386.c ++++ b/gcc/config/i386/i386.c +@@ -36049,10 +36049,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, + { + case IX86_BUILTIN_CPU_INIT: + { +- /* Make it call __cpu_indicator_init in libgcc. */ ++ /* Make it call __cpu_indicator_init_local in libgcc.a. */ + tree call_expr, fndecl, type; + type = build_function_type_list (integer_type_node, NULL_TREE); +- fndecl = build_fn_decl ("__cpu_indicator_init", type); ++ fndecl = build_fn_decl ("__cpu_indicator_init_local", type); + call_expr = build_call_expr (fndecl, 0); + return expand_expr (call_expr, target, mode, EXPAND_NORMAL); + } +diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c +index 8c2248d..6c82f15 100644 +--- a/libgcc/config/i386/cpuinfo.c ++++ b/libgcc/config/i386/cpuinfo.c +@@ -485,7 +485,7 @@ __cpu_indicator_init (void) + return 0; + } + +-#if defined SHARED && defined USE_ELF_SYMVER +-__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); +-__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); ++#ifndef SHARED ++int __cpu_indicator_init_local (void) ++ __attribute__ ((weak, alias ("__cpu_indicator_init"))); + #endif +diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux +index 11bb46e..4f47f7b 100644 +--- a/libgcc/config/i386/t-linux ++++ b/libgcc/config/i386/t-linux +@@ -3,4 +3,4 @@ + # t-slibgcc-elf-ver and t-linux + SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver + +-HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER ++HOST_LIBGCC2_CFLAGS += -mlong-double-80 +-- +2.8.1 + diff --git a/talimatname/genel/c/ct-aarch64-musl/0005-libatomic-test-fix.patch b/talimatname/genel/c/ct-aarch64-musl/0005-libatomic-test-fix.patch new file mode 100644 index 000000000..cf47368f7 --- /dev/null +++ b/talimatname/genel/c/ct-aarch64-musl/0005-libatomic-test-fix.patch @@ -0,0 +1,179 @@ +From 82cde54d45da469cc8aa762193318919d88a7eef Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 20 Aug 2016 17:02:31 +0000 +Subject: [PATCH 5/8] libatomic-test-fix + +--- + libatomic/configure | 5 +++- + libatomic/configure.ac | 1 + + libatomic/testsuite/Makefile.am | 2 ++ + libatomic/testsuite/Makefile.in | 33 +++++++++++++---------- + libatomic/testsuite/lib/libatomic.exp | 5 ++++ + libatomic/testsuite/libatomic-test-support.exp.in | 1 + + 6 files changed, 32 insertions(+), 15 deletions(-) + create mode 100644 libatomic/testsuite/libatomic-test-support.exp.in + +diff --git a/libatomic/configure b/libatomic/configure +index 8526abf..d185e9d 100755 +--- a/libatomic/configure ++++ b/libatomic/configure +@@ -9083,7 +9083,7 @@ _LT_EOF + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else +- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' ++ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + +@@ -15264,6 +15264,8 @@ fi + + ac_config_files="$ac_config_files Makefile testsuite/Makefile" + ++ac_config_files="$ac_config_files testsuite/libatomic-test-support.exp" ++ + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +@@ -16312,6 +16314,7 @@ do + "gstdint.h") CONFIG_COMMANDS="$CONFIG_COMMANDS gstdint.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; ++ "testsuite/libatomic-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libatomic-test-support.exp" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +diff --git a/libatomic/configure.ac b/libatomic/configure.ac +index cf40ea1..7ed2bcc 100644 +--- a/libatomic/configure.ac ++++ b/libatomic/configure.ac +@@ -261,4 +261,5 @@ else + fi + + AC_CONFIG_FILES(Makefile testsuite/Makefile) ++AC_CONFIG_FILES(testsuite/libatomic-test-support.exp) + AC_OUTPUT +diff --git a/libatomic/testsuite/Makefile.am b/libatomic/testsuite/Makefile.am +index 561b7e2..6c5e5fc 100644 +--- a/libatomic/testsuite/Makefile.am ++++ b/libatomic/testsuite/Makefile.am +@@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \ + _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ + echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) + RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)" ++ ++all-local: libatomic-test-support.exp +diff --git a/libatomic/testsuite/Makefile.in b/libatomic/testsuite/Makefile.in +index 34f83e0..16f28fa 100644 +--- a/libatomic/testsuite/Makefile.in ++++ b/libatomic/testsuite/Makefile.in +@@ -52,7 +52,8 @@ build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ + subdir = testsuite +-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ++DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ++ $(srcdir)/libatomic-test-support.exp.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ +@@ -69,7 +70,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs + CONFIG_HEADER = $(top_builddir)/auto-config.h +-CONFIG_CLEAN_FILES = ++CONFIG_CLEAN_FILES = libatomic-test-support.exp + CONFIG_CLEAN_VPATH_FILES = + SOURCES = + am__can_run_installinfo = \ +@@ -255,6 +256,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__aclocal_m4_deps): ++libatomic-test-support.exp: $(top_builddir)/config.status $(srcdir)/libatomic-test-support.exp.in ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + + mostlyclean-libtool: + -rm -f *.lo +@@ -315,7 +318,7 @@ distclean-DEJAGNU: + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + check: check-am +-all-am: Makefile ++all-am: Makefile all-local + installdirs: + install: install-am + install-exec: install-exec-am +@@ -415,19 +418,21 @@ uninstall-am: + + .MAKE: check-am install-am install-strip + +-.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ +- clean-libtool distclean distclean-DEJAGNU distclean-generic \ +- distclean-libtool dvi dvi-am html html-am info info-am install \ +- install-am install-data install-data-am install-dvi \ +- install-dvi-am install-exec install-exec-am install-html \ +- install-html-am install-info install-info-am install-man \ +- install-pdf install-pdf-am install-ps install-ps-am \ +- install-strip installcheck installcheck-am installdirs \ +- maintainer-clean maintainer-clean-generic mostlyclean \ +- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- uninstall uninstall-am ++.PHONY: all all-am all-local check check-DEJAGNU check-am clean \ ++ clean-generic clean-libtool distclean distclean-DEJAGNU \ ++ distclean-generic distclean-libtool dvi dvi-am html html-am \ ++ info info-am install install-am install-data install-data-am \ ++ install-dvi install-dvi-am install-exec install-exec-am \ ++ install-html install-html-am install-info install-info-am \ ++ install-man install-pdf install-pdf-am install-ps \ ++ install-ps-am install-strip installcheck installcheck-am \ ++ installdirs maintainer-clean maintainer-clean-generic \ ++ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ++ ps ps-am uninstall uninstall-am + + ++all-local: libatomic-test-support.exp ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +diff --git a/libatomic/testsuite/lib/libatomic.exp b/libatomic/testsuite/lib/libatomic.exp +index cafab54..e374c64 100644 +--- a/libatomic/testsuite/lib/libatomic.exp ++++ b/libatomic/testsuite/lib/libatomic.exp +@@ -47,6 +47,8 @@ load_gcc_lib timeout.exp + load_gcc_lib timeout-dg.exp + load_gcc_lib fortran-modules.exp + ++load_file libatomic-test-support.exp ++ + set dg-do-what-default run + + # +@@ -74,6 +76,7 @@ proc libatomic_init { args } { + global ALWAYS_CFLAGS + global CFLAGS + global TOOL_EXECUTABLE TOOL_OPTIONS ++ global BUILD_CC + global GCC_UNDER_TEST + global TESTING_IN_BUILD_TREE + global target_triplet +@@ -89,6 +92,8 @@ proc libatomic_init { args } { + if ![info exists GCC_UNDER_TEST] then { + if [info exists TOOL_EXECUTABLE] { + set GCC_UNDER_TEST $TOOL_EXECUTABLE ++ } elseif [info exists BUILD_CC] { ++ set GCC_UNDER_TEST $BUILD_CC + } else { + set GCC_UNDER_TEST "[find_gcc]" + } +diff --git a/libatomic/testsuite/libatomic-test-support.exp.in b/libatomic/testsuite/libatomic-test-support.exp.in +new file mode 100644 +index 0000000..972f8d5 +--- /dev/null ++++ b/libatomic/testsuite/libatomic-test-support.exp.in +@@ -0,0 +1 @@ ++set BUILD_CC "@CC@" +-- +2.8.1 + diff --git a/talimatname/genel/c/ct-aarch64-musl/0006-libgomp-test-fix.patch b/talimatname/genel/c/ct-aarch64-musl/0006-libgomp-test-fix.patch new file mode 100644 index 000000000..c0d8bd5ae --- /dev/null +++ b/talimatname/genel/c/ct-aarch64-musl/0006-libgomp-test-fix.patch @@ -0,0 +1,44 @@ +From c2afcdde5fa51b938fb824549f65ec170b5bc96a Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 20 Aug 2016 19:11:37 +0000 +Subject: [PATCH 6/8] libgomp-test-fix + +--- + libgomp/testsuite/lib/libgomp.exp | 3 +++ + libgomp/testsuite/libgomp-test-support.exp.in | 2 ++ + 2 files changed, 5 insertions(+) + +diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp +index 1cb4991..398ba1f 100644 +--- a/libgomp/testsuite/lib/libgomp.exp ++++ b/libgomp/testsuite/lib/libgomp.exp +@@ -85,6 +85,7 @@ proc libgomp_init { args } { + global ALWAYS_CFLAGS + global CFLAGS + global TOOL_EXECUTABLE TOOL_OPTIONS ++ global BUILD_CC + global GCC_UNDER_TEST + global TESTING_IN_BUILD_TREE + global target_triplet +@@ -107,6 +108,8 @@ proc libgomp_init { args } { + if ![info exists GCC_UNDER_TEST] then { + if [info exists TOOL_EXECUTABLE] { + set GCC_UNDER_TEST $TOOL_EXECUTABLE ++ } elseif [info exists BUILD_CC] { ++ set GCC_UNDER_TEST $BUILD_CC + } else { + set GCC_UNDER_TEST "[find_gcc]" + } +diff --git a/libgomp/testsuite/libgomp-test-support.exp.in b/libgomp/testsuite/libgomp-test-support.exp.in +index 5a724fb..b3cb4c7 100644 +--- a/libgomp/testsuite/libgomp-test-support.exp.in ++++ b/libgomp/testsuite/libgomp-test-support.exp.in +@@ -1,3 +1,5 @@ ++set BUILD_CC "@CC@" ++ + set cuda_driver_include "@CUDA_DRIVER_INCLUDE@" + set cuda_driver_lib "@CUDA_DRIVER_LIB@" + set hsa_runtime_lib "@HSA_RUNTIME_LIB@" +-- +2.8.1 + diff --git a/talimatname/genel/c/ct-aarch64-musl/0007-libitm-test-fix.patch b/talimatname/genel/c/ct-aarch64-musl/0007-libitm-test-fix.patch new file mode 100644 index 000000000..407b331e0 --- /dev/null +++ b/talimatname/genel/c/ct-aarch64-musl/0007-libitm-test-fix.patch @@ -0,0 +1,188 @@ +From 37a62bfb856637c5e869ab8e74695ffbb6e668a4 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 20 Aug 2016 19:16:39 +0000 +Subject: [PATCH 7/8] libitm-test-fix + +--- + libitm/configure | 7 ++++-- + libitm/configure.ac | 1 + + libitm/testsuite/Makefile.am | 2 ++ + libitm/testsuite/Makefile.in | 33 +++++++++++++++++------------ + libitm/testsuite/lib/libitm.exp | 5 +++++ + libitm/testsuite/libitm-test-support.exp.in | 1 + + 6 files changed, 33 insertions(+), 16 deletions(-) + create mode 100644 libitm/testsuite/libitm-test-support.exp.in + +diff --git a/libitm/configure b/libitm/configure +index 55332bb..09fd041 100644 +--- a/libitm/configure ++++ b/libitm/configure +@@ -9762,7 +9762,7 @@ _LT_EOF + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else +- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' ++ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + +@@ -14248,7 +14248,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else +- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' ++ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) +@@ -17638,6 +17638,8 @@ fi + + ac_config_files="$ac_config_files Makefile testsuite/Makefile libitm.spec" + ++ac_config_files="$ac_config_files testsuite/libitm-test-support.exp" ++ + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure + # tests run on this system so they can be shared between configure +@@ -18799,6 +18801,7 @@ do + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; + "libitm.spec") CONFIG_FILES="$CONFIG_FILES libitm.spec" ;; ++ "testsuite/libitm-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libitm-test-support.exp" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +diff --git a/libitm/configure.ac b/libitm/configure.ac +index 3875aa0..70ce8dc 100644 +--- a/libitm/configure.ac ++++ b/libitm/configure.ac +@@ -287,4 +287,5 @@ AM_CONDITIONAL([ARCH_X86_AVX], [test "$libitm_cv_as_avx" = yes]) + AM_CONDITIONAL([ARCH_FUTEX], [test $enable_linux_futex = yes]) + + AC_CONFIG_FILES(Makefile testsuite/Makefile libitm.spec) ++AC_CONFIG_FILES(testsuite/libitm-test-support.exp) + AC_OUTPUT +diff --git a/libitm/testsuite/Makefile.am b/libitm/testsuite/Makefile.am +index 561b7e2..688d48f 100644 +--- a/libitm/testsuite/Makefile.am ++++ b/libitm/testsuite/Makefile.am +@@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \ + _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ + echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) + RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)" ++ ++all-local: libitm-test-support.exp +diff --git a/libitm/testsuite/Makefile.in b/libitm/testsuite/Makefile.in +index 4d79781..8b7bc8e 100644 +--- a/libitm/testsuite/Makefile.in ++++ b/libitm/testsuite/Makefile.in +@@ -52,7 +52,8 @@ build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ + subdir = testsuite +-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ++DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ++ $(srcdir)/libitm-test-support.exp.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/asmcfi.m4 \ +@@ -74,7 +75,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h +-CONFIG_CLEAN_FILES = ++CONFIG_CLEAN_FILES = libitm-test-support.exp + CONFIG_CLEAN_VPATH_FILES = + SOURCES = + am__can_run_installinfo = \ +@@ -265,6 +266,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__aclocal_m4_deps): ++libitm-test-support.exp: $(top_builddir)/config.status $(srcdir)/libitm-test-support.exp.in ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + + mostlyclean-libtool: + -rm -f *.lo +@@ -325,7 +328,7 @@ distclean-DEJAGNU: + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + check: check-am +-all-am: Makefile ++all-am: Makefile all-local + installdirs: + install: install-am + install-exec: install-exec-am +@@ -425,19 +428,21 @@ uninstall-am: + + .MAKE: check-am install-am install-strip + +-.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ +- clean-libtool distclean distclean-DEJAGNU distclean-generic \ +- distclean-libtool dvi dvi-am html html-am info info-am install \ +- install-am install-data install-data-am install-dvi \ +- install-dvi-am install-exec install-exec-am install-html \ +- install-html-am install-info install-info-am install-man \ +- install-pdf install-pdf-am install-ps install-ps-am \ +- install-strip installcheck installcheck-am installdirs \ +- maintainer-clean maintainer-clean-generic mostlyclean \ +- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- uninstall uninstall-am ++.PHONY: all all-am all-local check check-DEJAGNU check-am clean \ ++ clean-generic clean-libtool distclean distclean-DEJAGNU \ ++ distclean-generic distclean-libtool dvi dvi-am html html-am \ ++ info info-am install install-am install-data install-data-am \ ++ install-dvi install-dvi-am install-exec install-exec-am \ ++ install-html install-html-am install-info install-info-am \ ++ install-man install-pdf install-pdf-am install-ps \ ++ install-ps-am install-strip installcheck installcheck-am \ ++ installdirs maintainer-clean maintainer-clean-generic \ ++ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ++ ps ps-am uninstall uninstall-am + + ++all-local: libitm-test-support.exp ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +diff --git a/libitm/testsuite/lib/libitm.exp b/libitm/testsuite/lib/libitm.exp +index 0416296..a896e02 100644 +--- a/libitm/testsuite/lib/libitm.exp ++++ b/libitm/testsuite/lib/libitm.exp +@@ -47,6 +47,8 @@ load_gcc_lib timeout-dg.exp + load_gcc_lib torture-options.exp + load_gcc_lib fortran-modules.exp + ++load_file libitm-test-support.exp ++ + set dg-do-what-default run + + # +@@ -74,6 +76,7 @@ proc libitm_init { args } { + global ALWAYS_CFLAGS + global CFLAGS + global TOOL_EXECUTABLE TOOL_OPTIONS ++ global BUILD_CC + global GCC_UNDER_TEST + global TESTING_IN_BUILD_TREE + global target_triplet +@@ -89,6 +92,8 @@ proc libitm_init { args } { + if ![info exists GCC_UNDER_TEST] then { + if [info exists TOOL_EXECUTABLE] { + set GCC_UNDER_TEST $TOOL_EXECUTABLE ++ } elseif [info exists BUILD_CC] { ++ set GCC_UNDER_TEST $BUILD_CC + } else { + set GCC_UNDER_TEST "[find_gcc]" + } +diff --git a/libitm/testsuite/libitm-test-support.exp.in b/libitm/testsuite/libitm-test-support.exp.in +new file mode 100644 +index 0000000..972f8d5 +--- /dev/null ++++ b/libitm/testsuite/libitm-test-support.exp.in +@@ -0,0 +1 @@ ++set BUILD_CC "@CC@" +-- +2.8.1 + diff --git a/talimatname/genel/c/ct-aarch64-musl/0008-libvtv-test-fix.patch b/talimatname/genel/c/ct-aarch64-musl/0008-libvtv-test-fix.patch new file mode 100644 index 000000000..91f0135a9 --- /dev/null +++ b/talimatname/genel/c/ct-aarch64-musl/0008-libvtv-test-fix.patch @@ -0,0 +1,172 @@ +From 51e98cbe7c3b71e2b351254b6f82eb6b7bdfb7d1 Mon Sep 17 00:00:00 2001 +From: Szabolcs Nagy +Date: Sat, 20 Aug 2016 21:20:29 +0000 +Subject: [PATCH 8/8] libvtv-test-fix + +--- + libvtv/configure | 3 +++ + libvtv/configure.ac | 1 + + libvtv/testsuite/Makefile.am | 2 ++ + libvtv/testsuite/Makefile.in | 33 +++++++++++++++++------------ + libvtv/testsuite/lib/libvtv.exp | 5 +++++ + libvtv/testsuite/libvtv-test-support.exp.in | 1 + + 6 files changed, 31 insertions(+), 14 deletions(-) + create mode 100644 libvtv/testsuite/libvtv-test-support.exp.in + +diff --git a/libvtv/configure b/libvtv/configure +index ea1a17f..93e4d8e 100755 +--- a/libvtv/configure ++++ b/libvtv/configure +@@ -15465,6 +15465,8 @@ ac_config_files="$ac_config_files Makefile" + if test "x$VTV_SUPPORTED" = "xyes"; then + ac_config_files="$ac_config_files testsuite/Makefile" + ++ ac_config_files="$ac_config_files testsuite/libvtv-test-support.exp" ++ + fi + + case "$target_os" in +@@ -16628,6 +16630,7 @@ do + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; ++ "testsuite/libvtv-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libvtv-test-support.exp" ;; + + *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +diff --git a/libvtv/configure.ac b/libvtv/configure.ac +index 19c6508..31ce1ba 100644 +--- a/libvtv/configure.ac ++++ b/libvtv/configure.ac +@@ -174,6 +174,7 @@ _EOF + . ${multi_basedir}/config-ml.in + AS_UNSET([ml_norecursion]) + ]) ++ AC_CONFIG_FILES(testsuite/libvtv-test-support.exp) + fi + + case "$target_os" in +diff --git a/libvtv/testsuite/Makefile.am b/libvtv/testsuite/Makefile.am +index 561b7e2..6c5e5fc 100644 +--- a/libvtv/testsuite/Makefile.am ++++ b/libvtv/testsuite/Makefile.am +@@ -11,3 +11,5 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \ + _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ + echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) + RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)" ++ ++all-local: libatomic-test-support.exp +diff --git a/libvtv/testsuite/Makefile.in b/libvtv/testsuite/Makefile.in +index e19e13e..60754ce 100644 +--- a/libvtv/testsuite/Makefile.in ++++ b/libvtv/testsuite/Makefile.in +@@ -52,7 +52,8 @@ build_triplet = @build@ + host_triplet = @host@ + target_triplet = @target@ + subdir = testsuite +-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ++DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ++ $(srcdir)/libvtv-test-support.exp.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/depstand.m4 \ +@@ -68,7 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs +-CONFIG_CLEAN_FILES = ++CONFIG_CLEAN_FILES = libvtv-test-support.exp + CONFIG_CLEAN_VPATH_FILES = + SOURCES = + am__can_run_installinfo = \ +@@ -260,6 +261,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__aclocal_m4_deps): ++libvtv-test-support.exp: $(top_builddir)/config.status $(srcdir)/libvtv-test-support.exp.in ++ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ + + mostlyclean-libtool: + -rm -f *.lo +@@ -320,7 +323,7 @@ distclean-DEJAGNU: + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU + check: check-am +-all-am: Makefile ++all-am: Makefile all-local + installdirs: + install: install-am + install-exec: install-exec-am +@@ -420,19 +423,21 @@ uninstall-am: + + .MAKE: check-am install-am install-strip + +-.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ +- clean-libtool distclean distclean-DEJAGNU distclean-generic \ +- distclean-libtool dvi dvi-am html html-am info info-am install \ +- install-am install-data install-data-am install-dvi \ +- install-dvi-am install-exec install-exec-am install-html \ +- install-html-am install-info install-info-am install-man \ +- install-pdf install-pdf-am install-ps install-ps-am \ +- install-strip installcheck installcheck-am installdirs \ +- maintainer-clean maintainer-clean-generic mostlyclean \ +- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- uninstall uninstall-am ++.PHONY: all all-am all-local check check-DEJAGNU check-am clean \ ++ clean-generic clean-libtool distclean distclean-DEJAGNU \ ++ distclean-generic distclean-libtool dvi dvi-am html html-am \ ++ info info-am install install-am install-data install-data-am \ ++ install-dvi install-dvi-am install-exec install-exec-am \ ++ install-html install-html-am install-info install-info-am \ ++ install-man install-pdf install-pdf-am install-ps \ ++ install-ps-am install-strip installcheck installcheck-am \ ++ installdirs maintainer-clean maintainer-clean-generic \ ++ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ++ ps ps-am uninstall uninstall-am + + ++all-local: libatomic-test-support.exp ++ + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: +diff --git a/libvtv/testsuite/lib/libvtv.exp b/libvtv/testsuite/lib/libvtv.exp +index edf5fdd..70e2d0e 100644 +--- a/libvtv/testsuite/lib/libvtv.exp ++++ b/libvtv/testsuite/lib/libvtv.exp +@@ -47,6 +47,8 @@ load_gcc_lib timeout-dg.exp + load_gcc_lib torture-options.exp + load_gcc_lib fortran-modules.exp + ++load_file libvtv-test-support.exp ++ + set dg-do-what-default run + + # +@@ -74,6 +76,7 @@ proc libvtv_init { args } { + global ALWAYS_CFLAGS + global CFLAGS + global TOOL_EXECUTABLE TOOL_OPTIONS ++ global BUILD_CC + global GCC_UNDER_TEST + global TESTING_IN_BUILD_TREE + global target_triplet +@@ -89,6 +92,8 @@ proc libvtv_init { args } { + if ![info exists GCC_UNDER_TEST] then { + if [info exists TOOL_EXECUTABLE] { + set GCC_UNDER_TEST $TOOL_EXECUTABLE ++ } elseif [info exists BUILD_CC] { ++ set GCC_UNDER_TEST $BUILD_CC + } else { + set GCC_UNDER_TEST "[find_gcc]" + } +diff --git a/libvtv/testsuite/libvtv-test-support.exp.in b/libvtv/testsuite/libvtv-test-support.exp.in +new file mode 100644 +index 0000000..972f8d5 +--- /dev/null ++++ b/libvtv/testsuite/libvtv-test-support.exp.in +@@ -0,0 +1 @@ ++set BUILD_CC "@CC@" +-- +2.8.1 + diff --git a/talimatname/genel/c/ct-aarch64-musl/mpfr-patch01 b/talimatname/genel/c/ct-aarch64-musl/mpfr-patch01 new file mode 100644 index 000000000..5c742f0ee --- /dev/null +++ b/talimatname/genel/c/ct-aarch64-musl/mpfr-patch01 @@ -0,0 +1,285 @@ +diff -Naurd mpfr-3.1.6-a/PATCHES mpfr-3.1.6-b/PATCHES +--- mpfr-3.1.6-a/PATCHES 2017-10-26 13:55:51.168013439 +0000 ++++ mpfr-3.1.6-b/PATCHES 2017-10-26 13:55:51.236013121 +0000 +@@ -0,0 +1 @@ ++mpfr_get +diff -Naurd mpfr-3.1.6-a/VERSION mpfr-3.1.6-b/VERSION +--- mpfr-3.1.6-a/VERSION 2017-09-07 11:36:44.000000000 +0000 ++++ mpfr-3.1.6-b/VERSION 2017-10-26 13:55:51.236013121 +0000 +@@ -1 +1 @@ +-3.1.6 ++3.1.6-p1 +diff -Naurd mpfr-3.1.6-a/src/get_ld.c mpfr-3.1.6-b/src/get_ld.c +--- mpfr-3.1.6-a/src/get_ld.c 2017-01-01 01:39:09.000000000 +0000 ++++ mpfr-3.1.6-b/src/get_ld.c 2017-10-26 13:55:51.208013252 +0000 +@@ -41,6 +41,9 @@ + mpfr_exp_t sh; /* exponent shift, so that x/2^sh is in the double range */ + mpfr_t y, z; + int sign; ++ MPFR_SAVE_EXPO_DECL (expo); ++ ++ MPFR_SAVE_EXPO_MARK (expo); + + /* first round x to the target long double precision, so that + all subsequent operations are exact (this avoids double rounding +@@ -103,6 +106,7 @@ + } + if (sign < 0) + r = -r; ++ MPFR_SAVE_EXPO_FREE (expo); + return r; + } + } +diff -Naurd mpfr-3.1.6-a/src/get_si.c mpfr-3.1.6-b/src/get_si.c +--- mpfr-3.1.6-a/src/get_si.c 2017-01-01 01:39:09.000000000 +0000 ++++ mpfr-3.1.6-b/src/get_si.c 2017-10-26 13:55:51.208013252 +0000 +@@ -28,6 +28,7 @@ + mpfr_prec_t prec; + long s; + mpfr_t x; ++ MPFR_SAVE_EXPO_DECL (expo); + + if (MPFR_UNLIKELY (!mpfr_fits_slong_p (f, rnd))) + { +@@ -39,14 +40,22 @@ + if (MPFR_IS_ZERO (f)) + return (long) 0; + +- /* determine prec of long */ +- for (s = LONG_MIN, prec = 0; s != 0; s /= 2, prec++) ++ /* Determine the precision of long. |LONG_MIN| may have one more bit ++ as an integer, but in this case, this is a power of 2, thus fits ++ in a precision-prec floating-point number. */ ++ for (s = LONG_MAX, prec = 0; s != 0; s /= 2, prec++) + { } + ++ MPFR_SAVE_EXPO_MARK (expo); ++ + /* first round to prec bits */ + mpfr_init2 (x, prec); + mpfr_rint (x, f, rnd); + ++ /* The flags from mpfr_rint are the wanted ones. In particular, ++ it sets the inexact flag when necessary. */ ++ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); ++ + /* warning: if x=0, taking its exponent is illegal */ + if (MPFR_UNLIKELY (MPFR_IS_ZERO(x))) + s = 0; +@@ -65,5 +74,7 @@ + + mpfr_clear (x); + ++ MPFR_SAVE_EXPO_FREE (expo); ++ + return s; + } +diff -Naurd mpfr-3.1.6-a/src/get_sj.c mpfr-3.1.6-b/src/get_sj.c +--- mpfr-3.1.6-a/src/get_sj.c 2017-01-01 01:39:09.000000000 +0000 ++++ mpfr-3.1.6-b/src/get_sj.c 2017-10-26 13:55:51.208013252 +0000 +@@ -35,6 +35,7 @@ + intmax_t r; + mpfr_prec_t prec; + mpfr_t x; ++ MPFR_SAVE_EXPO_DECL (expo); + + if (MPFR_UNLIKELY (!mpfr_fits_intmax_p (f, rnd))) + { +@@ -46,20 +47,24 @@ + if (MPFR_IS_ZERO (f)) + return (intmax_t) 0; + +- /* determine the precision of intmax_t */ +- for (r = MPFR_INTMAX_MIN, prec = 0; r != 0; r /= 2, prec++) ++ /* Determine the precision of intmax_t. |INTMAX_MIN| may have one ++ more bit as an integer, but in this case, this is a power of 2, ++ thus fits in a precision-prec floating-point number. */ ++ for (r = MPFR_INTMAX_MAX, prec = 0; r != 0; r /= 2, prec++) + { } +- /* Note: though INTMAX_MAX would have been sufficient for the conversion, +- we chose INTMAX_MIN so that INTMAX_MIN - 1 is always representable in +- precision prec; this is useful to detect overflows in MPFR_RNDZ (will +- be needed later). */ + +- /* Now, r = 0. */ ++ MPFR_ASSERTD (r == 0); ++ ++ MPFR_SAVE_EXPO_MARK (expo); + + mpfr_init2 (x, prec); + mpfr_rint (x, f, rnd); + MPFR_ASSERTN (MPFR_IS_FP (x)); + ++ /* The flags from mpfr_rint are the wanted ones. In particular, ++ it sets the inexact flag when necessary. */ ++ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); ++ + if (MPFR_NOTZERO (x)) + { + mp_limb_t *xp; +@@ -67,15 +72,15 @@ + + xp = MPFR_MANT (x); + sh = MPFR_GET_EXP (x); +- MPFR_ASSERTN ((mpfr_prec_t) sh <= prec); ++ MPFR_ASSERTN ((mpfr_prec_t) sh <= prec + 1); + if (MPFR_INTMAX_MIN + MPFR_INTMAX_MAX != 0 +- && MPFR_UNLIKELY ((mpfr_prec_t) sh == prec)) ++ && MPFR_UNLIKELY ((mpfr_prec_t) sh > prec)) + { + /* 2's complement and x <= INTMAX_MIN: in the case mp_limb_t + has the same size as intmax_t, we cannot use the code in + the for loop since the operations would be performed in + unsigned arithmetic. */ +- MPFR_ASSERTN (MPFR_IS_NEG (x) && (mpfr_powerof2_raw (x))); ++ MPFR_ASSERTN (MPFR_IS_NEG (x) && mpfr_powerof2_raw (x)); + r = MPFR_INTMAX_MIN; + } + else if (MPFR_IS_POS (x)) +@@ -117,6 +122,8 @@ + + mpfr_clear (x); + ++ MPFR_SAVE_EXPO_FREE (expo); ++ + return r; + } + +diff -Naurd mpfr-3.1.6-a/src/get_ui.c mpfr-3.1.6-b/src/get_ui.c +--- mpfr-3.1.6-a/src/get_ui.c 2017-01-01 01:39:09.000000000 +0000 ++++ mpfr-3.1.6-b/src/get_ui.c 2017-10-26 13:55:51.208013252 +0000 +@@ -30,6 +30,7 @@ + mpfr_t x; + mp_size_t n; + mpfr_exp_t exp; ++ MPFR_SAVE_EXPO_DECL (expo); + + if (MPFR_UNLIKELY (!mpfr_fits_ulong_p (f, rnd))) + { +@@ -44,10 +45,16 @@ + for (s = ULONG_MAX, prec = 0; s != 0; s /= 2, prec ++) + { } + ++ MPFR_SAVE_EXPO_MARK (expo); ++ + /* first round to prec bits */ + mpfr_init2 (x, prec); + mpfr_rint (x, f, rnd); + ++ /* The flags from mpfr_rint are the wanted ones. In particular, ++ it sets the inexact flag when necessary. */ ++ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); ++ + /* warning: if x=0, taking its exponent is illegal */ + if (MPFR_IS_ZERO(x)) + s = 0; +@@ -61,5 +68,7 @@ + + mpfr_clear (x); + ++ MPFR_SAVE_EXPO_FREE (expo); ++ + return s; + } +diff -Naurd mpfr-3.1.6-a/src/get_uj.c mpfr-3.1.6-b/src/get_uj.c +--- mpfr-3.1.6-a/src/get_uj.c 2017-01-01 01:39:09.000000000 +0000 ++++ mpfr-3.1.6-b/src/get_uj.c 2017-10-26 13:55:51.208013252 +0000 +@@ -35,6 +35,7 @@ + uintmax_t r; + mpfr_prec_t prec; + mpfr_t x; ++ MPFR_SAVE_EXPO_DECL (expo); + + if (MPFR_UNLIKELY (!mpfr_fits_uintmax_p (f, rnd))) + { +@@ -50,12 +51,18 @@ + for (r = MPFR_UINTMAX_MAX, prec = 0; r != 0; r /= 2, prec++) + { } + +- /* Now, r = 0. */ ++ MPFR_ASSERTD (r == 0); ++ ++ MPFR_SAVE_EXPO_MARK (expo); + + mpfr_init2 (x, prec); + mpfr_rint (x, f, rnd); + MPFR_ASSERTN (MPFR_IS_FP (x)); + ++ /* The flags from mpfr_rint are the wanted ones. In particular, ++ it sets the inexact flag when necessary. */ ++ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); ++ + if (MPFR_NOTZERO (x)) + { + mp_limb_t *xp; +@@ -76,6 +83,8 @@ + + mpfr_clear (x); + ++ MPFR_SAVE_EXPO_FREE (expo); ++ + return r; + } + +diff -Naurd mpfr-3.1.6-a/src/get_z.c mpfr-3.1.6-b/src/get_z.c +--- mpfr-3.1.6-a/src/get_z.c 2017-01-01 01:39:09.000000000 +0000 ++++ mpfr-3.1.6-b/src/get_z.c 2017-10-26 13:55:51.208013252 +0000 +@@ -29,6 +29,7 @@ + int inex; + mpfr_t r; + mpfr_exp_t exp; ++ MPFR_SAVE_EXPO_DECL (expo); + + if (MPFR_UNLIKELY (MPFR_IS_SINGULAR (f))) + { +@@ -41,6 +42,8 @@ + return 0; + } + ++ MPFR_SAVE_EXPO_MARK (expo); ++ + exp = MPFR_GET_EXP (f); + /* if exp <= 0, then |f|<1, thus |o(f)|<=1 */ + MPFR_ASSERTN (exp < 0 || exp <= MPFR_PREC_MAX); +@@ -50,6 +53,11 @@ + MPFR_ASSERTN (inex != 1 && inex != -1); /* integral part of f is + representable in r */ + MPFR_ASSERTN (MPFR_IS_FP (r)); ++ ++ /* The flags from mpfr_rint are the wanted ones. In particular, ++ it sets the inexact flag when necessary. */ ++ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); ++ + exp = mpfr_get_z_2exp (z, r); + if (exp >= 0) + mpz_mul_2exp (z, z, exp); +@@ -57,5 +65,7 @@ + mpz_fdiv_q_2exp (z, z, -exp); + mpfr_clear (r); + ++ MPFR_SAVE_EXPO_FREE (expo); ++ + return inex; + } +diff -Naurd mpfr-3.1.6-a/src/mpfr.h mpfr-3.1.6-b/src/mpfr.h +--- mpfr-3.1.6-a/src/mpfr.h 2017-09-07 11:36:44.000000000 +0000 ++++ mpfr-3.1.6-b/src/mpfr.h 2017-10-26 13:55:51.232013138 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 6 +-#define MPFR_VERSION_STRING "3.1.6" ++#define MPFR_VERSION_STRING "3.1.6-p1" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.6-a/src/version.c mpfr-3.1.6-b/src/version.c +--- mpfr-3.1.6-a/src/version.c 2017-09-07 11:36:44.000000000 +0000 ++++ mpfr-3.1.6-b/src/version.c 2017-10-26 13:55:51.232013138 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.6"; ++ return "3.1.6-p1"; + } diff --git a/talimatname/genel/c/ct-aarch64-musl/talimat b/talimatname/genel/c/ct-aarch64-musl/talimat new file mode 100644 index 000000000..69f69157b --- /dev/null +++ b/talimatname/genel/c/ct-aarch64-musl/talimat @@ -0,0 +1,319 @@ +# Tanım: aarch64 mimari için musl C kütüphaneli çapraz derleme araçları +# URL: http://gcc.gnu.org +# Paketçi: milisarge +# Gerekler: +# Grup: geliştirme + +isim=ct-aarch64-musl +surum=1.0 +devir=1 + +gcc_surum=6.4.0 +musl_surum=1.1.18 +binutils_surum=2.29.1 +linux_surum=4.13.13 +gmp_surum=6.1.2 +mpfr_surum=3.1.6 +mpc_surum=1.0.3 +isl_surum=0.18 + +kaynak=(http://ftp.gnu.org/gnu/gcc/gcc-$gcc_surum/gcc-${gcc_surum}.tar.xz + http://ftp.gnu.org/gnu/binutils/binutils-${binutils_surum}.tar.xz + http://www.kernel.org/pub/linux/kernel/v4.x/linux-${linux_surum}.tar.xz + http://ftp.gnu.org/gnu/gmp/gmp-${gmp_surum}.tar.xz + http://ftp.gnu.org/gnu/mpfr/mpfr-${mpfr_surum}.tar.xz + http://ftp.gnu.org/gnu/mpc/mpc-${mpc_surum}.tar.gz + http://isl.gforge.inria.fr/isl-${isl_surum}.tar.bz2 + https://www.musl-libc.org/releases/musl-${musl_surum}.tar.gz + mpfr-patch01 + 0001-libgcc_s.patch + 0005-libatomic-test-fix.patch + 0006-libgomp-test-fix.patch + 0007-libitm-test-fix.patch + 0008-libvtv-test-fix.patch) + +derle() { + + # http://clfs.org/view/clfs-embedded/arm/cross-tools/cflags.html + # bayrakların sıfırlanması + + unset CC CXX CFLAGS CXXFLAGS LDFLAGS + + LC_ALL=C + LANGUAGE=C + export LC_ALL LANGUAGE + + CTCC="${CTCC:=cc}" + CTCXX="${CTCXX:=c++}" + CTCFLAGS="${CTCFLAGS:=-g0 -Os}" + CTCXXFLAGS="${CTCXXFLAGS:=$CTCFLAGS}" + CTLDFLAGS="${CTLDFLAGS:=-s}" + arch="$(uname -m)" + jobs=1 + + # vendor-üretici varsa sonek tire konulacak + test -n "$VENDOR" && VENDOR="${VENDOR}-" + + # + # x86_64: x86_64 (generic). + # + + CLFS_ARCH=arm64 + libc_arch=aarch64 + + libSuffix="" + + multilib_options="--disable-multilib --with-multilib-list=" + gcc_options="--enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419" + + CLFS_TARGET=aarch64-${VENDOR}linux-musl + + CLFS_HOST="$(${CTCC} -dumpmachine)" + + crossdir=${PKG}/cross-tools/${CLFS_TARGET} + + echo "değişken kontrolü" + printf "%s\n" \ + "CTCC: $CTCC" \ + "CTCXX: $CTCXX" \ + "CTCFLAGS: $CTCFLAGS" \ + "CTCXXFLAGS: $CTCXXFLAGS" \ + "CTLDFLAGS: $CTLDFLAGS" \ + "Host: ${CLFS_HOST}" \ + "Target: ${CLFS_TARGET}" \ + "Cross directory: $crossdir" + + # http://clfs.org/view/clfs-embedded/arm/cross-tools/sysroot.html + mkdir -p ${PKG}/cross-tools/${CLFS_TARGET} + + # izinleri ayarla + umask 022 + + PATH="${crossdir}/bin:${PATH}" + export PATH VENDOR + + mkdir -p -- "${crossdir}/${CLFS_TARGET}" + + if test ! -e "${crossdir}/${CLFS_TARGET}/usr" + then + ln -sf . "${crossdir}/${CLFS_TARGET}/usr" + fi + + # multilib için lib ekinin ayarlanması + case $arch in + i586 | *x32 | x86_64 ) + if test ! -e "${crossdir}/lib" -a -n "$libSuffix" + then + ln -sf lib${libSuffix} "${crossdir}/lib" + fi + ;; + esac + + + ############################################################### + # https://notabug.org/dragora/dragora/src/master/stages/0/01-binutils#L30 + # binutils derlenmesi + + mkdir $SRC/binutils-build + cd $SRC/binutils-build + + $SRC/binutils-${binutils_surum}/configure \ + AR="ar" AS="as" CC="$CTCC" CXX="$CTCXX" \ + CFLAGS="$CTCFLAGS" CXXFLAGS="$CTCXXFLAGS" LDFLAGS="$CTLDFLAGS" \ + --prefix="${crossdir}" \ + --host=${CLFS_HOST} \ + --target=${CLFS_TARGET} \ + --enable-deterministic-archives \ + --disable-compressed-debug-sections \ + --disable-werror \ + --disable-nls \ + --disable-ppl-version-check \ + --disable-cloog-version-check \ + --with-sysroot="${crossdir}/${CLFS_TARGET}" \ + $multilib_options + + # https://sourceware.org/bugzilla/show_bug.cgi?id=15345 + # texinfolara gerek yok MAKEINFO=true . hata olursa tekrarlayınca çözülüyor. + make -j${jobs} MAKEINFO=true || make -j${jobs} MAKEINFO="true" + make -j${jobs} MAKEINFO=true install + + cd $SRC + rm -rf $SRC/binutils-build + + ############################################################### + # linux-header + + cd -- "${SRC}/linux-${linux_surum}" + + make mrproper + make headers_check ARCH="${CLFS_ARCH}" + make headers_install ARCH="${CLFS_ARCH}" INSTALL_HDR_PATH=dest + + # linux header kopyalanması + mkdir -p -- "${crossdir}/${CLFS_TARGET}/include" + cp -r dest/include/* "${crossdir}/${CLFS_TARGET}/include" + + # gereksizleri sil + find "${crossdir}/${CLFS_TARGET}/include" -type f \( -name .install -o -name ..install.cmd \) -exec rm -f {} + + + ############################################################### + # http://clfs.org/view/clfs-embedded/arm/cross-tools/gcc-static.html + # https://notabug.org/dragora/dragora/src/master/stages/0/03-gcc-static#L75 + # gcc-static -0 + cd $SRC + + cp -rf -- "${SRC}/gcc-${gcc_surum}" "${SRC}/0gcc-${gcc_surum}" + cp -rf -- "${SRC}/gmp-${gmp_surum}" "${SRC}/0gcc-${gcc_surum}/gmp" + cp -rf -- "${SRC}/mpfr-${mpfr_surum}" "${SRC}/0gcc-${gcc_surum}/mpfr" + cp -rf -- "${SRC}/mpc-${mpc_surum}" "${SRC}/0gcc-${gcc_surum}/mpc" + cp -rf -- "${SRC}/isl-${isl_surum}" "${SRC}/0gcc-${gcc_surum}/isl" + + cd -- "${SRC}/0gcc-${gcc_surum}" + + cd mpfr + rm -f PATCHES + patch -p1 < "$SRC/mpfr-patch01" + cd .. + + # Apply specific patches for the support in musl. + # + # http://port70.net/~nsz/musl/gcc-trunk/ + # + patch -Np1 -i "${SRC}/0001-libgcc_s.patch" + patch -Np1 -i "${SRC}/0005-libatomic-test-fix.patch" + patch -Np1 -i "${SRC}/0006-libgomp-test-fix.patch" + patch -Np1 -i "${SRC}/0007-libitm-test-fix.patch" + patch -Np1 -i "${SRC}/0008-libvtv-test-fix.patch" + + # Build dizininde ayrı derlenir + rm -rf ../gcc-build + mkdir ../gcc-build + cd ../gcc-build + + ../0gcc-${gcc_surum}/configure \ + AR="ar" CC="$CTCC" CXX="$CTCXX" \ + CFLAGS="$CTCFLAGS" CXXFLAGS="$CTCXXFLAGS" LDFLAGS="$CTLDFLAGS" \ + --prefix="$crossdir" \ + --libdir="${crossdir}/lib${libSuffix}" \ + --build=${CLFS_HOST} \ + --host=${CLFS_HOST} \ + --target=${CLFS_TARGET} \ + --enable-languages=c \ + --enable-clocale=generic \ + --disable-shared \ + --disable-threads \ + --disable-decimal-float \ + --disable-libgomp \ + --disable-libssp \ + --disable-libatomic \ + --disable-libitm \ + --disable-libquadmath \ + --disable-libvtv \ + --disable-libcilkrts \ + --disable-libstdcxx \ + --disable-gnu-indirect-function \ + --disable-libmudflap \ + --disable-libsanitizer \ + --disable-libmpx \ + --disable-nls \ + --with-sysroot="${crossdir}/${CLFS_TARGET}" \ + --with-newlib \ + --without-headers \ + --without-ppl \ + --without-cloog \ + $multilib_options \ + $gcc_options + + # tekrar make yapılınca derleme başarılı oluyor. + make -j${jobs} all-gcc || (make -j${jobs} all-mpfr;make -j${jobs} all-gcc || (make -j${jobs} all-isl;make -j${jobs} all-gcc)) + make -j${jobs} all-target-libgcc + make install-gcc + make install-target-libgcc + + cd $SRC + rm -rf $SRC/gcc-build + rm -rf ${SRC}/0gcc-${gcc_surum} + + ############################################################### + # http://clfs.org/view/clfs-embedded/arm/cross-tools/libc.html + # https://notabug.org/dragora/dragora/src/master/stages/0/04-musl#L25 + # musl + + cd -- "${SRC}/musl-${musl_surum}" + + ./configure CC="${CLFS_TARGET}-gcc" CROSS_COMPILE="${CLFS_TARGET}-" \ + --prefix= \ + --syslibdir=/lib \ + --enable-debug \ + --enable-optimize + + make -j${jobs} + make DESTDIR="${crossdir}/${CLFS_TARGET}" install + + ############################################################### + # http://clfs.org/view/clfs-embedded/arm/cross-tools/gcc-final.html + # gcc-son + + cd -- "${SRC}/gcc-${gcc_surum}" + + # son adımda linkleyerek yapabiliriz + ln -s ../gmp-${gmp_surum} gmp + ln -s ../mpfr-${mpfr_surum} mpfr + ln -s ../mpc-${mpc_surum} mpc + ln -s ../isl-${isl_surum} isl + + # Apply patches for MPFR + cd mpfr + rm -f PATCHES + patch -p1 < "$SRC/mpfr-patch01" + cd .. + # Apply specific patches for the support in musl. + # + # http://port70.net/~nsz/musl/gcc-trunk/ + # + patch -Np1 -i "${SRC}/0001-libgcc_s.patch" + patch -Np1 -i "${SRC}/0005-libatomic-test-fix.patch" + patch -Np1 -i "${SRC}/0006-libgomp-test-fix.patch" + patch -Np1 -i "${SRC}/0007-libitm-test-fix.patch" + patch -Np1 -i "${SRC}/0008-libvtv-test-fix.patch" + + rm -rf $SRC/gcc-build + mkdir $SRC/gcc-build + cd $SRC/gcc-build + + option_list=" + --prefix="$crossdir" \ + --libdir="${crossdir}/lib${libSuffix}" \ + --build=${CLFS_HOST} \ + --host=${CLFS_HOST} \ + --target=${CLFS_TARGET} \ + --enable-languages=c,c++ \ + --enable-clocale=generic \ + --enable-tls \ + --enable-libstdcxx-time \ + --enable-checking=release \ + --enable-fully-dynamic-string \ + --disable-symvers \ + --disable-gnu-indirect-function \ + --disable-libmudflap \ + --disable-libsanitizer \ + --disable-libmpx \ + --disable-nls \ + --disable-lto-plugin \ + --with-sysroot="${crossdir}/${CLFS_TARGET}" \ + $multilib_options \ + $gcc_options + " + + $SRC/gcc-${gcc_surum}/configure AR="ar" \ + CFLAGS="$CTCFLAGS" CXXFLAGS="$CTCXXFLAGS" LDFLAGS="$CTLDFLAGS" \ + $option_list + + unset option_list + + make -j${jobs} all \ + AS_FOR_TARGET="${CLFS_TARGET}-as" \ + LD_FOR_TARGET="${CLFS_TARGET}-ld" + + make install +}