[LLVMbugs] [Bug 13796] New: Missing __ARM_PCS_VFP symbol on arm hard-float system causes error

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 7 15:50:19 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13796

             Bug #: 13796
           Summary: Missing __ARM_PCS_VFP symbol on arm hard-float system
                    causes error
           Product: clang
           Version: 3.1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ted at krovetz.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


On any hard-float system, when I install both gcc and clang on an Arch ARM
Linux system, clang won't work because /usr/include/gnu/stubs-soft.h is
missing.

```
clang -mfpu=vfp -mfloat-abi=hard test.c
In file included from test.c:1:
In file included from /usr/include/stdio.h:27:
In file included from /usr/include/features.h:399:
/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-soft.h' file not found
# include <gnu/stubs-soft.h>
          ^
1 error generated.
```

/usr/include/gnu/stubs-hard.h is installed because we are on a hard-float
system, but /usr/include/gnu/stubs.h has the following compile time macro

```
#if !defined __ARM_PCS_VFP
# include <gnu/stubs-soft.h>
#endif
#if defined __ARM_PCS_VFP
# include <gnu/stubs-hard.h>
#endif
```

__ARM_PCS_VFP must not be defined under clang, because compiling with clang
fails when it can't find stubs-soft.h.

I work around the issue by doing the following, which appears to do no harm.

```
ln -s /usr/include/gnu/stubs-hard.h /usr/include/gnu/stubs-soft.h
```

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list