[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: [Pcc] weakref [Was: [Pcc-commit] CVS commit: pcc/arch/amd64]
From:       Anders Magnusson <ragge () ludd ! ltu ! se>
Date:       2014-04-14 17:27:52
Message-ID: 534C1A98.3070602 () ludd ! ltu ! se
[Download RAW message or body]

Hi Antoine,

Antoine Leca skrev 2014-04-14 16:41:
> Hi,
>
> Sorry to not have spotted it earlier :-(
> But there is something I am uncomfortable with:
>
> Anders Magnusson wrote on March 20th
>> List:       pcc-commit-list
>> Subject:    [Pcc-commit] CVS commit: pcc/arch/amd64
>> Date:       2014-03-20 18:45:36
>> Message-ID: 20140320184536.CB1918443 () pcc ! ludd ! ltu ! se
>>
>>
>> Module Name:	pcc
>> Committed By:	ragge
>> Date:		Thu Mar 20 18:45:36 UTC 2014
>>
>> Modified Files:
>> 	pcc/arch/amd64: local.c macdefs.h
>>
>> Log Message:
>> WEAKREF is understood by modern assemblers.
>>
>>
>> To generate a diff of this commit:
>> cvs rdiff -u -r1.76 -r1.77 pcc/arch/amd64/local.c
>> cvs rdiff -u -r1.27 -r1.28 pcc/arch/amd64/macdefs.h
>>
>> Please note that diffs are not public domain; they are subject to the
>> copyright notices on the relevant files.
> : Here is the diffs:
>
> Index: pcc/arch/amd64/macdefs.h
> diff -u pcc/arch/amd64/macdefs.h:1.27 pcc/arch/amd64/macdefs.h:1.28
> --- pcc/arch/amd64/macdefs.h:1.27	Fri Dec 28 17:02:49 2012
> +++ pcc/arch/amd64/macdefs.h	Thu Mar 20 19:45:36 2014
> @@ -1,4 +1,4 @@
> -/*	$Id: macdefs.h,v 1.27 2012/12/28 16:02:49 ragge Exp $	*/
> +/*	$Id: macdefs.h,v 1.28 2014/03/20 18:45:36 ragge Exp $	*/
>   /*
>    * Copyright (c) 2008 Michael Shalayeff
>    * Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
> @@ -258,6 +258,7 @@
>   #define	XASM_NUMCONV(ip, p, q)	numconv(ip, p, q)
>   #define	XASMCONSTREGS(x)	xasmconstregs(x)
>
> +#define	HAVE_WEAKREF
>   /*
>    * builtins.
>    */
> ----------------------------
>
> I was thinking this really should be detected by some autoconf
> machinery, shouldn't it?
>
> The real complexity is probably _how_ to successfully detect it...
> (after having established what is the as to use, successfully invoked it
> --which we are not doing at the moment IIUC, etc.)
>
> Or is it a feature which is really required (at least for ELF/amd64) for
> pcc to work correctly, at least right now?
>
Weakref is something that most (all?) amd64 ELF OSes use, and expects it 
to exist.
That is also true with current gas (since quite some years ago).  I 
added it in a
somewhat awkward way to amd64, it should be target-independent.  But not 
yet.

Maybe it should be detected by autoconf, but that may open another can 
of worms.

Feel welcome with a better solution.

-- Ragge

_______________________________________________
Pcc mailing list
Pcc@lists.ludd.ltu.se
http://lists.ludd.ltu.se/cgi-bin/mailman/listinfo/pcc
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic