r256641 - Disable generating movt on FreeBSD.
Davide Italiano via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 30 05:53:27 PST 2015
Author: davide
Date: Wed Dec 30 07:53:25 2015
New Revision: 256641
URL: http://llvm.org/viewvc/llvm-project?rev=256641&view=rev
Log:
Disable generating movt on FreeBSD.
It's sort of an hack, but we have no choice.
The linker in the base system doesn't handle that correctly (yet).
Once FreeBSD will import lld, this can be backed out.
Patch by: Andrew Turner!
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/arm-no-movt.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=256641&r1=256640&r2=256641&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Dec 30 07:53:25 2015
@@ -938,8 +938,8 @@ static void getARMTargetFeatures(const T
if (Args.hasArg(options::OPT_ffixed_r9))
Features.push_back("+reserve-r9");
- // The kext linker doesn't know how to deal with movw/movt.
- if (KernelOrKext)
+ // The kext and FreeBSD linkers don't know how to deal with movw/movt.
+ if (KernelOrKext || Triple.isOSFreeBSD())
Features.push_back("+no-movt");
}
Modified: cfe/trunk/test/Driver/arm-no-movt.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-no-movt.c?rev=256641&r1=256640&r2=256641&view=diff
==============================================================================
--- cfe/trunk/test/Driver/arm-no-movt.c (original)
+++ cfe/trunk/test/Driver/arm-no-movt.c Wed Dec 30 07:53:25 2015
@@ -4,6 +4,11 @@
// RUN: %clang -target armv7-apple-darwin -mkernel -### %s 2>&1 \
// RUN: | FileCheck %s -check-prefix CHECK-KERNEL
+// RUN: %clang -target armv7-gnueabi-freebsd11 -### %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-FREEBSD
+
// CHECK-DEFAULT-NOT: "-target-feature" "+no-movt"
// CHECK-KERNEL: "-target-feature" "+no-movt"
+
+// CHECK-FREEBSD: "-target-feature" "+no-movt"
More information about the cfe-commits
mailing list