Commit Graph

27 Commits

Author SHA1 Message Date
Petr Hosek 2db0cb23ff [ADT] Normalize empty triple components
LLVM triple normalization is handling "unknown" and empty components
differently; for example given "x86_64-unknown-linux-gnu" and
"x86_64-linux-gnu" which should be equivalent, triple normalization
returns "x86_64-unknown-linux-gnu" and "x86_64--linux-gnu". autoconf's
config.sub returns "x86_64-unknown-linux-gnu" for both
"x86_64-linux-gnu" and "x86_64-unknown-linux-gnu". This changes the
triple normalization to behave the same way, replacing empty triple
components with "unknown".

This addresses PR37129.

Differential Revision: https://reviews.llvm.org/D50219

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339294 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-08 22:23:57 +00:00
Joerg Sonnenberger 0e07398059 Support linking static PIE binaries on NetBSD
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@336947 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-12 21:21:29 +00:00
Joerg Sonnenberger a746878c53 Ensure that clang -pthread creates the right macro. -D_POSIX_THREADS
seems to have been a C&P error from old GCC specs for OpenBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292119 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 14:07:24 +00:00
Joerg Sonnenberger cf7bcc3e6b Extend NetBSD/AArch64 to cover Big Endian as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291436 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09 11:22:14 +00:00
Joerg Sonnenberger 1391e6f4bd Give FileCheck a hint on which ld to match. Under Windows, the preferred
match was the ld.elf_so that should be matched in a second step. Add one
of the ever-present-but-irrelevant-for-this-test arguments to the
pattern to force matching the right argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-06 13:13:12 +00:00
Joerg Sonnenberger cc5af0af4f Add PIE magic for NetBSD. Add tests for the correct flags for
non-shared, PIE and shared output mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-04 20:03:26 +00:00
Joerg Sonnenberger 286b035690 Now that Sparc/Sparc64 backend is mostly usable, provide the same
linking defaults as other NetBSD targets, i.e. compiler_rt-in-libc and
libc++ as STL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-02-11 23:18:36 +00:00
Joerg Sonnenberger 6116fc0887 Reorganise CPU handling for Sparc. When using -mcpu=v9 and co, __sparcv8
is not defined for 32bit mode, but __sparcv9 is. Pass down the correct
-target-cpu flags to the backend, so that instruction restrictions are
applied correctly. Pass down the correct -A flag when not using IAS.
The latter is limited to NetBSD targets in this commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252545 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-09 23:39:45 +00:00
Joerg Sonnenberger 816d62a7d2 For the --be8 flag, check explicitly for pre-v7 / pre-v6m cores.
Those used the old Big Endian support on ARM and don't need flags.
Refactor the logic in a separate common function, which also looks at
-march. Add corresponding logic for the Linux toolchain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227393 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 23:30:39 +00:00
Joerg Sonnenberger d6bdd30501 For NetBSD/ARM-EB, link with --be8. Support for the older BE32 is
currently not planned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227088 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 12:30:16 +00:00
Joerg Sonnenberger 66cf4e3c1f Use the big endian emulations for NetBSD/arm in EB mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215670 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-14 19:12:41 +00:00
Joerg Sonnenberger 0608843877 For NetBSD, use the same settings for PPC64 as for PPC when it comes to
integrated assembler, libc++ and libgcc. Set emulation for ld for both
platforms for correct -m32 handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215551 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-13 14:17:32 +00:00
Joerg Sonnenberger a88987d654 Use the correct fallback directory for EABIHF targets on NetBSD/arm.
From Matt Thomas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215292 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-09 19:01:52 +00:00
Joerg Sonnenberger c27f519bc1 NetBSD/aarch64 has no libgcc or libstdc++. Drop arm64 tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215291 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-09 18:28:36 +00:00
Joerg Sonnenberger 423eb50d92 Now that PIC generation on PPC32 is supported, hook up linking support
for NetBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213972 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-25 20:57:24 +00:00
Joerg Sonnenberger 63b875dd61 Drop libgcc and default to libc++ for NetBSD/ARM on 6.99.40+.
Don't bother with keeping the old support for x86_64 in 6.99.23+, just
use a single range. Update test cases for the always-on --eh-frame-hdr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208170 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-07 08:45:26 +00:00
James Molloy fc79f1829d [ARM64] Add ARM64 RUN lines to a bunch of tests that had AARCH64 RUN lines.
This covers all tests in tests/Driver and tests/Preprocessor, but there are some
failing tests in test/Sema that need looking into.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206464 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-17 12:51:36 +00:00
Joerg Sonnenberger 7967360edc Handle -m32 for NetBSD/sparc64 correctly. Extend test case to also check
ARM, MIPS and i386 ABIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206416 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 20:44:17 +00:00
Joerg Sonnenberger 5f44722c26 Always use --eh-frame-hdr on NetBSD, even for -static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203742 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-13 00:42:01 +00:00
Joerg Sonnenberger 4590e1108f Default to ARMv5e for NetBSD/EABI, ARMv4 for APCS.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201894 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-21 21:53:33 +00:00
Joerg Sonnenberger 8fd4888fe2 Hook up NetBSD/sparc and NetBSD/sparc64 as and ld invocations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201730 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 22:40:18 +00:00
Joerg Sonnenberger 8bc7719d6b Use correct ld emulation for EABI hardware float triple on NetBSD.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200946 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-06 21:04:32 +00:00
Joerg Sonnenberger ee57e8c8e8 Test cases for NetBSD/eARM
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200709 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03 17:46:52 +00:00
Joerg Sonnenberger dd99856132 Hook up NetBSD/aarch64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199124 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-13 18:25:15 +00:00
NAKAMURA Takumi d982752501 clang/test/Driver/netbsd.c*: Tweak path separators to be matched on win32 driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192676 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-15 06:36:47 +00:00
Joerg Sonnenberger f7c462cbaa Provide a dummy NetBSD tree and use --sysroot in the driver test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192641 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 23:26:44 +00:00
Joerg Sonnenberger e69cca4850 For NetBSD/current on X86 do not use libgcc and default to libc++.
Adjust linkage to make more sense for older releases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192615 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-14 20:13:05 +00:00