| Summary: | Compiling with -mcpu fails on code including sys/user.h | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Tim Bishop <tdb> |
| Component: | sparc64 | Assignee: | freebsd-sparc64 (Nobody) <sparc64> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | CC: | tdb |
| Priority: | Normal | ||
| Version: | 5.3-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed CPU ultrasparc is the default. Unfornately the configuring for what mcpu should parse is a little convoluted and this is why using mcpu=ultrasparc doesn't work. But if it did work, it wouldn't make any difference. |
If I optimise for my ultrasparc 2 processor by using the compile option: -mcpu=ultrasparc I get the following build failure: /usr/include/sys/user.h:105:2: #error "Unknown architecture" Fix: Unsure. There's some tests in user.h which are all failing. Maybe another case needs to be added? How-To-Repeat: Simple code to demonstrate this: #include <stdio.h> #include <sys/param.h> #include <sys/user.h> int main() { printf("Hello World\n"); return 0; } Testing compiling normally and with -mcpu: gcc -Wall -o hello hello.c gcc -Wall -mcpu=ultrasparc -o hello2 hello.c In file included from hello.c:3: /usr/include/sys/user.h:105:2: #error "Unknown architecture" The first compile worked fine, and the second failed.