Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 150174 Details for
Bug 214765
>=kernel-2.6.25 won't compile with current sparc toolchain
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
sparc-gcc.c
sparc-gcc.c (text/plain), 1.20 KB, created by
Raúl Porcel (RETIRED)
on 2008-04-18 14:42:31 UTC
(
hide
)
Description:
sparc-gcc.c
Filename:
MIME Type:
Creator:
Raúl Porcel (RETIRED)
Created:
2008-04-18 14:42:31 UTC
Size:
1.20 KB
patch
obsolete
>#include <stdlib.h> >#include <stdio.h> >#include <sys/types.h> >#include <sys/stat.h> >#include <unistd.h> >#include <string.h> >#include <sys/utsname.h> > >#ifndef GCC_NAME >#error GCC_NAME must be defined >#endif > >#define __stringify_1(x) #x >#define stringify(x) __stringify_1(x) > >#define GCC_EXEC stringify(GCC_NAME) > >#define M64_TEST "/usr/lib64/libc.so" >#define M64_OVERRIDE "/etc/disable_64_gcc" >#define ARG_m64 "-m64" >#define ARG_m32 "-m32" > >int main(int argc, char *argv[]) >{ > int hardwired = 0, i; > char **newargv; > > /* 2 extra. One for the trailing NULL, the other for possibly > * adding -m32 or -m64. */ > newargv = malloc(sizeof(char *) * (argc + 2)); > if (newargv == NULL) { > perror(GCC_EXEC); > exit(1); > } > > for (i = 0; i < argc; i++) { > if (!strcmp(argv[i], ARG_m32) || !strcmp(argv[i], ARG_m64)) > hardwired = 1; > > newargv[i] = argv[i]; > } > > if (!hardwired) { > struct utsname uts; > struct stat st; > > uname(&uts); > > /* The compiler defaults to -m32, so we don't need to add > * that. I hope. */ > if (!strcmp("sparc64", uts.machine) && !stat(M64_TEST, &st) && stat(M64_OVERRIDE, &st)) > newargv[i++] = ARG_m64; > } > > newargv[i] = NULL; > > execv("/usr/bin/" GCC_EXEC, newargv); > > perror(GCC_EXEC); > > exit(1); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 214765
:
147314
|
150174
|
153367
|
176437