This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix PR 39570 - cabs/cabsf named differently on NetBSD


I have committed the attached patch to fix PR 39570.

The problem is that the NetBSD cabs/cabsf/cabsl funcions are called __c99_cabs etc. as NetBSD needed to change the ABI before it had symbol versioning. This is handled in the system header file as
   double cabs(double _Complex) __asm("__c99_cabs");
but __builtin_cabs still generates a call to cabs (which fails much of the fortran testsuite).

I have fixed this by using SUBTARGET_INIT_BUILTINS in the same way as Darwin is solving a similar problem.


Bootstrapped and tested on i386-unknown-netbsdelf6.1 and
x86_64-unknown-netbsd6.1.

     /Krister


2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>

 	PR target/39570
 	* gcc/config/netbsd-protos.h: New file.
 	* gcc/config/netbsd.c: New file.
 	* gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
 	* gcc/config/t-netbsd: New file.
 	* gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
 	(tmake_file) Add t-netbsd.
 	(extra_objs) Add netbsd.o.

Attachment: pr39570.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]