Re: clang: ignore -fno-force-addr

2017-04-26 Thread Stuart Henderson
On 2017/04/26 00:47, Jeremie Courreges-Anglas wrote:
> "Ted Unangst"  writes:
> 
> > Jeremie Courreges-Anglas wrote:
> >> 
> >> clang already recognizes (and ignores) -fforce-addr but errors out
> >> on -fno-force-addr.  This breaks the build of ports/databases/qdbm:
> >> 
> >>   
> >> http://build-failures.rhaalovely.net/amd64-clang/2017-04-14/databases/qdbm.log
> >> 
> >> Fixing the port is easy, but so is ignoring -fno-force-addr.
> >> -fno-force-addr should probably be pushed upstream if the latter is
> >> preferred.
> >> 
> >> Thoughts?
> >
> > If the option is obsolete, I'd say we'd be doing the world a favor by
> > upstreaming a patch to fix qdbm.
> 
> I'm not sure what you mean by obsolete ("ignored"?).  A bunch of
> packages out there use -fforce-addr but since qdbm seems to be the only
> user of -fno-force-addr, I guess there's not much point in adding
> support for a no-op.  (The port has been fixed since.)

10 years old, so I don't think it's upstream-able.

What they're actually doing here is "-fforce-addr" by default and then
adding "-fno-force-addr" on BSDs to disable it again.



Re: clang: ignore -fno-force-addr

2017-04-25 Thread Jeremie Courreges-Anglas
"Ted Unangst"  writes:

> Jeremie Courreges-Anglas wrote:
>> 
>> clang already recognizes (and ignores) -fforce-addr but errors out
>> on -fno-force-addr.  This breaks the build of ports/databases/qdbm:
>> 
>>   
>> http://build-failures.rhaalovely.net/amd64-clang/2017-04-14/databases/qdbm.log
>> 
>> Fixing the port is easy, but so is ignoring -fno-force-addr.
>> -fno-force-addr should probably be pushed upstream if the latter is
>> preferred.
>> 
>> Thoughts?
>
> If the option is obsolete, I'd say we'd be doing the world a favor by
> upstreaming a patch to fix qdbm.

I'm not sure what you mean by obsolete ("ignored"?).  A bunch of
packages out there use -fforce-addr but since qdbm seems to be the only
user of -fno-force-addr, I guess there's not much point in adding
support for a no-op.  (The port has been fixed since.)

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: clang: ignore -fno-force-addr

2017-04-21 Thread Ted Unangst
Jeremie Courreges-Anglas wrote:
> 
> clang already recognizes (and ignores) -fforce-addr but errors out
> on -fno-force-addr.  This breaks the build of ports/databases/qdbm:
> 
>   
> http://build-failures.rhaalovely.net/amd64-clang/2017-04-14/databases/qdbm.log
> 
> Fixing the port is easy, but so is ignoring -fno-force-addr.
> -fno-force-addr should probably be pushed upstream if the latter is
> preferred.
> 
> Thoughts?

If the option is obsolete, I'd say we'd be doing the world a favor by
upstreaming a patch to fix qdbm.



Re: clang: ignore -fno-force-addr

2017-04-19 Thread Joerg Sonnenberger
On Wed, Apr 19, 2017 at 10:30:43AM -0600, Todd C. Miller wrote:
> In general, if -fdo-something is supported I think it should also
> accept -fno-do-something.  Since this was seen in the wild, patching
> llvm makes the most sense.  Bonus points if you can get it upstreamed.

The positive forms of some harmless / useless GCC options are recognized
if they are popular. It was never meant to be exhaustive and there is
little motivation for adding to the list just because one person
brilliantly decided to pick something from the GCC manual. I'd just drop
the option -- it only exists in modern GCC for legacy compat as well.

Joerg



Re: clang: ignore -fno-force-addr

2017-04-19 Thread Todd C. Miller
In general, if -fdo-something is supported I think it should also
accept -fno-do-something.  Since this was seen in the wild, patching
llvm makes the most sense.  Bonus points if you can get it upstreamed.

 - todd



clang: ignore -fno-force-addr

2017-04-19 Thread Jeremie Courreges-Anglas

clang already recognizes (and ignores) -fforce-addr but errors out
on -fno-force-addr.  This breaks the build of ports/databases/qdbm:

  http://build-failures.rhaalovely.net/amd64-clang/2017-04-14/databases/qdbm.log

Fixing the port is easy, but so is ignoring -fno-force-addr.
-fno-force-addr should probably be pushed upstream if the latter is
preferred.

Thoughts?

Diff tested with rebuilding base clang.


Index: gnu/llvm/tools/clang/include/clang/Driver/Options.td
===
RCS file: /d/cvs/src/gnu/llvm/tools/clang/include/clang/Driver/Options.td,v
retrieving revision 1.4
diff -u -p -r1.4 Options.td
--- gnu/llvm/tools/clang/include/clang/Driver/Options.td24 Jan 2017 
08:39:08 -  1.4
+++ gnu/llvm/tools/clang/include/clang/Driver/Options.td19 Apr 2017 
13:20:17 -
@@ -1149,6 +1149,7 @@ def force__cpusubtype__ALL : Flag<["-"],
 def force__flat__namespace : Flag<["-"], "force_flat_namespace">;
 def force__load : Separate<["-"], "force_load">;
 def force_addr : Joined<["-"], "fforce-addr">, Group;
+def fno_force_addr : Joined<["-"], "fno-force-addr">, 
Group;
 def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group;
 def fpack_struct : Flag<["-"], "fpack-struct">, Group;
 def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group;


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE