This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH target/32787] Sun Studio 12 Undefined symbol addl
- From: Mark Wright <markwright at internode dot on dot net>
- To: gcc-patches at gcc dot gnu dot org
- Cc: pinskia at gcc dot gnu dot org; Mark Wright <markwright at internode dot on dot net>
- Date: Tue, 17 Jul 2007 17:32:52 +1000
- Subject: [PATCH target/32787] Sun Studio 12 Undefined symbol addl
It would be neat if someone could consider reviewing the following
proposed patch to add inline asm for Sun Studio 12. And it
would be neat if the reviewed patch is approved if someone could
please commit it sometime to the gcc source code base.
Thanks, Mark
------- Comment #3 from markwright at internode dot on dot net
2007-07-17 07:14 ------- Created an attachment (id=13929)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13929&action=view)
Proposed patch for bug 32787
The proposed patch compiles with Sun Studio 12.
I wrote the following little test program:
goanna% cat ../../gcc/config/i386/test_host_detect_local_cpu.c
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <stdlib.h>
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
const char *host_detect_local_cpu (int argc, const char **argv);
int main(int argc, char **argv)
{
const char *bargv[1] = { "arch" };
const char *local_cpu = host_detect_local_cpu (1, bargv);
printf("%s\n", local_cpu);
return 0;
}
void fancy_abort(const char *a, int b, const char *c)
{
abort();
}
goanna%
Compiling it with Sun Studio 12 give the following result:
goanna% /opt/SunStudio12/SUNWspro/bin/cc -c -errtags=yes +w -g
-DIN_GCC -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/.
-I../../gcc/../include -I./../intl -I../../gcc/../libcpp/include
-I../../gcc/../libdecnumber -I../libdecnumber -I. -I. -I../../gcc
-I../../gcc/. -I../../gcc/../include -I./../intl
-I../../gcc/../libcpp/include -I../../gcc/../libdecnumber
-I../libdecnumber ../../gcc/config/i386/test_host_detect_local_cpu.c
goanna% /opt/SunStudio12/SUNWspro/bin/cc -c -errtags=yes +w -g -DIN_GCC
-DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/.
-I../../gcc/../include -I./../intl -I../../gcc/../libcpp/include
-I../../gcc/../libdecnumber -I../libdecnumber -I. -I. -I../../gcc
-I../../gcc/. -I../../gcc/../include -I./../intl
-I../../gcc/../libcpp/include -I../../gcc/../libdecnumber
-I../libdecnumber ../../gcc/config/i386/driver-i386.c
"../../gcc/config/i386/driver-i386.c", line 126: warning: integer
overflow detected: op "<<" (E_INTEGER_OVERFLOW_DETECTED)
goanna% cc -o
t driver-i386.o
test_host_detect_local_cpu.o ../libcpp/libcpp.a ./../intl/libintl.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
goanna% ./t -march=k8
goanna%
After applying the patch, the gcc build with Sun Studio 12 then fails
due to following Sun Studio 12 bug (Sun intend to patch this soon,
and this Sun Studio 12 bug 6470247 has nothing to do with this
gcc patch):
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6470247
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32787
--