This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32787] Sun Studio 12 Undefined symbol addl
- From: "markwright at internode dot on dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jul 2007 07:14:38 -0000
- Subject: [Bug target/32787] Sun Studio 12 Undefined symbol addl
- References: <bug-32787-14866@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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