* bug#58434: Native compile results in error if -march and -mtune are specified
@ 2022-10-11 9:00 Loreno Heer
2022-10-11 13:40 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Loreno Heer @ 2022-10-11 9:00 UTC (permalink / raw)
To: 58434
The latest compile of emacs (from git from yesterday night) (on both
linux and windows) gives the following error with native compile and
-march options specified:
libgccjit-0.dll: error: bad value 'native' for '-march=' switch
libgccjit-0.dll: note: valid arguments to '-march=' switch are: nocona
core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge
core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake
icelake-client rocketlake icelake-server cascadelake tigerlake
cooperlake sapphirerapids alderlake bonnell atom silvermont slm goldmont
goldmont-plus tremont knl knm x86-64 x86-64-v2 x86-64-v3 x86-64-v4
eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8
k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10
barcelona bdver1 bdver2 bdver3 bdver4 znver1 znver2 znver3 btver1 btver2
native
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-11 9:00 bug#58434: Native compile results in error if -march and -mtune are specified Loreno Heer
@ 2022-10-11 13:40 ` Eli Zaretskii
[not found] ` <18231ac2-baca-e269-0f51-3c34e3283ea3@bluewin.ch>
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2022-10-11 13:40 UTC (permalink / raw)
To: Loreno Heer; +Cc: 58434
> Date: Tue, 11 Oct 2022 11:00:53 +0200
> From: Loreno Heer <loreno.heer@bluewin.ch>
>
>
> The latest compile of emacs (from git from yesterday night) (on both
> linux and windows) gives the following error with native compile and
> -march options specified:
How did you specify -march, and why did you specify it? AFAIK, the
default configuration doesn't use that switch.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
[not found] ` <18231ac2-baca-e269-0f51-3c34e3283ea3@bluewin.ch>
@ 2022-10-11 15:52 ` Eli Zaretskii
2022-10-11 18:58 ` Loreno Heer
2022-10-11 19:43 ` Andrea Corallo
0 siblings, 2 replies; 10+ messages in thread
From: Eli Zaretskii @ 2022-10-11 15:52 UTC (permalink / raw)
To: Loreno Heer, Andrea Corallo; +Cc: 58434
[Please use Reply All to keep the bug tracker on the CC list.]
> Date: Tue, 11 Oct 2022 15:48:54 +0200
> From: Loreno Heer <loreno.heer@bluewin.ch>
>
> (setq native-comp-compiler-options '("-O2" "-march=native" "-mtune=native"))
>
> in my .emacs file.
> I wanted to speed up the installation a bit. I found the suggestion
> here:
> https://www.reddit.com/r/emacs/comments/prihh8/optimization_flags_for_nativecomp_whats_the/
OK, so the compiler told you it doesn't support -march=native, so you
will have to specify the exact architecture.
Btw, I think you should use native-comp-driver-options for this, not
native-comp-compiler-options. Andrea, am I right? I think GCC is
"driver" and "compiler" means cc1, no? (If I'm right, we need to fix
the doc strings.)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-11 15:52 ` Eli Zaretskii
@ 2022-10-11 18:58 ` Loreno Heer
2022-10-11 19:43 ` Andrea Corallo
1 sibling, 0 replies; 10+ messages in thread
From: Loreno Heer @ 2022-10-11 18:58 UTC (permalink / raw)
To: Eli Zaretskii, Andrea Corallo; +Cc: 58434
Specifying the architecture directly works.
I used the following snippet
cc -march=native -Q --help=target
to query which architecture native would give me then replaced it. Both
windows (nehalem) and linux (tigerlake) seem to work fine so far, but
the packages that failed to compile previously need to be reinstalled I
guess.
Thanks for the help
On 11.10.2022 17:52, Eli Zaretskii wrote:
> [Please use Reply All to keep the bug tracker on the CC list.]
>
>> Date: Tue, 11 Oct 2022 15:48:54 +0200
>> From: Loreno Heer <loreno.heer@bluewin.ch>
>>
>> (setq native-comp-compiler-options '("-O2" "-march=native" "-mtune=native"))
>>
>> in my .emacs file.
>> I wanted to speed up the installation a bit. I found the suggestion
>> here:
>> https://www.reddit.com/r/emacs/comments/prihh8/optimization_flags_for_nativecomp_whats_the/
>
> OK, so the compiler told you it doesn't support -march=native, so you
> will have to specify the exact architecture.
>
> Btw, I think you should use native-comp-driver-options for this, not
> native-comp-compiler-options. Andrea, am I right? I think GCC is
> "driver" and "compiler" means cc1, no? (If I'm right, we need to fix
> the doc strings.)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-11 15:52 ` Eli Zaretskii
2022-10-11 18:58 ` Loreno Heer
@ 2022-10-11 19:43 ` Andrea Corallo
2022-10-12 4:55 ` Eli Zaretskii
1 sibling, 1 reply; 10+ messages in thread
From: Andrea Corallo @ 2022-10-11 19:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 58434, Loreno Heer
Eli Zaretskii <eliz@gnu.org> writes:
> [Please use Reply All to keep the bug tracker on the CC list.]
>
>> Date: Tue, 11 Oct 2022 15:48:54 +0200
>> From: Loreno Heer <loreno.heer@bluewin.ch>
>>
>> (setq native-comp-compiler-options '("-O2" "-march=native" "-mtune=native"))
>>
>> in my .emacs file.
>> I wanted to speed up the installation a bit. I found the suggestion
>> here:
>> https://www.reddit.com/r/emacs/comments/prihh8/optimization_flags_for_nativecomp_whats_the/
>
> OK, so the compiler told you it doesn't support -march=native, so you
> will have to specify the exact architecture.
>
> Btw, I think you should use native-comp-driver-options for this, not
> native-comp-compiler-options. Andrea, am I right? I think GCC is
> "driver" and "compiler" means cc1, no? (If I'm right, we need to fix
> the doc strings.)
Hi Eli,
native-comp-driver-options is for assembler and linker while
native-comp-compiler-options is for the compiler. AFAIK 'march' affects
code generation so it should got to the compiler, then I believe the use
of native-comp-compiler-options here is correct.
Andrea
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-11 19:43 ` Andrea Corallo
@ 2022-10-12 4:55 ` Eli Zaretskii
2022-10-12 7:13 ` Loreno Heer
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2022-10-12 4:55 UTC (permalink / raw)
To: Andrea Corallo; +Cc: 58434, loreno.heer
> From: Andrea Corallo <akrl@sdf.org>
> Cc: Loreno Heer <loreno.heer@bluewin.ch>, 58434@debbugs.gnu.org
> Date: Tue, 11 Oct 2022 19:43:22 +0000
>
> > OK, so the compiler told you it doesn't support -march=native, so you
> > will have to specify the exact architecture.
> >
> > Btw, I think you should use native-comp-driver-options for this, not
> > native-comp-compiler-options. Andrea, am I right? I think GCC is
> > "driver" and "compiler" means cc1, no? (If I'm right, we need to fix
> > the doc strings.)
>
> Hi Eli,
>
> native-comp-driver-options is for assembler and linker while
> native-comp-compiler-options is for the compiler. AFAIK 'march' affects
> code generation so it should got to the compiler, then I believe the use
> of native-comp-compiler-options here is correct.
OK, so I guess the only problem is that the compiler doesn't support
"-march=native", and needs a specific architecture instead of a
generic one.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-12 4:55 ` Eli Zaretskii
@ 2022-10-12 7:13 ` Loreno Heer
2022-10-12 7:29 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Loreno Heer @ 2022-10-12 7:13 UTC (permalink / raw)
To: Eli Zaretskii, Andrea Corallo; +Cc: 58434
>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: Loreno Heer <loreno.heer@bluewin.ch>, 58434@debbugs.gnu.org
>> Date: Tue, 11 Oct 2022 19:43:22 +0000
>>
>>> OK, so the compiler told you it doesn't support -march=native, so you
>>> will have to specify the exact architecture.
>>>
>>> Btw, I think you should use native-comp-driver-options for this, not
>>> native-comp-compiler-options. Andrea, am I right? I think GCC is
>>> "driver" and "compiler" means cc1, no? (If I'm right, we need to fix
>>> the doc strings.)
>>
>> Hi Eli,
>>
>> native-comp-driver-options is for assembler and linker while
>> native-comp-compiler-options is for the compiler. AFAIK 'march' affects
>> code generation so it should got to the compiler, then I believe the use
>> of native-comp-compiler-options here is correct.
>
> OK, so I guess the only problem is that the compiler doesn't support
> "-march=native", and needs a specific architecture instead of a
> generic one.
Yes, but there might be some disadvantages of specifying the
architecture directly. For example cache sizes are not supplied.
(https://stackoverflow.com/questions/5470257/how-to-see-which-flags-march-native-will-activate?noredirect=1&lq=1)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-12 7:13 ` Loreno Heer
@ 2022-10-12 7:29 ` Eli Zaretskii
2022-10-12 10:35 ` Loreno Heer
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2022-10-12 7:29 UTC (permalink / raw)
To: Loreno Heer; +Cc: 58434, akrl
> Date: Wed, 12 Oct 2022 09:13:34 +0200
> Cc: 58434@debbugs.gnu.org
> From: Loreno Heer <loreno.heer@bluewin.ch>
>
> > OK, so I guess the only problem is that the compiler doesn't support
> > "-march=native", and needs a specific architecture instead of a
> > generic one.
>
> Yes, but there might be some disadvantages of specifying the
> architecture directly. For example cache sizes are not supplied.
> (https://stackoverflow.com/questions/5470257/how-to-see-which-flags-march-native-will-activate?noredirect=1&lq=1)
What can Emacs do about this? The problem seems to be between you and
libgccjit/GCC you have installed. The rejection comes from there, not
from Emacs, AFAIU.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-12 7:29 ` Eli Zaretskii
@ 2022-10-12 10:35 ` Loreno Heer
2022-10-12 11:45 ` Andrea Corallo
0 siblings, 1 reply; 10+ messages in thread
From: Loreno Heer @ 2022-10-12 10:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 58434, akrl
You are right, did not notice this is a gccjit issue. I filed a bug
report with the gcc people. (might also be a packaging problem on mingw
and debian, that I don't know)
On 12.10.2022 09:29, Eli Zaretskii wrote:
>> Date: Wed, 12 Oct 2022 09:13:34 +0200
>> Cc: 58434@debbugs.gnu.org
>> From: Loreno Heer <loreno.heer@bluewin.ch>
>>
>>> OK, so I guess the only problem is that the compiler doesn't support
>>> "-march=native", and needs a specific architecture instead of a
>>> generic one.
>>
>> Yes, but there might be some disadvantages of specifying the
>> architecture directly. For example cache sizes are not supplied.
>> (https://stackoverflow.com/questions/5470257/how-to-see-which-flags-march-native-will-activate?noredirect=1&lq=1)
>
> What can Emacs do about this? The problem seems to be between you and
> libgccjit/GCC you have installed. The rejection comes from there, not
> from Emacs, AFAIU.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#58434: Native compile results in error if -march and -mtune are specified
2022-10-12 10:35 ` Loreno Heer
@ 2022-10-12 11:45 ` Andrea Corallo
0 siblings, 0 replies; 10+ messages in thread
From: Andrea Corallo @ 2022-10-12 11:45 UTC (permalink / raw)
To: Loreno Heer; +Cc: Eli Zaretskii, 58434-done
Loreno Heer <loreno.heer@bluewin.ch> writes:
> You are right, did not notice this is a gccjit issue. I filed a bug
> report with the gcc people. (might also be a packaging problem on mingw
> and debian, that I don't know)
Thanks, closing then.
Andrea
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-10-12 11:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-11 9:00 bug#58434: Native compile results in error if -march and -mtune are specified Loreno Heer
2022-10-11 13:40 ` Eli Zaretskii
[not found] ` <18231ac2-baca-e269-0f51-3c34e3283ea3@bluewin.ch>
2022-10-11 15:52 ` Eli Zaretskii
2022-10-11 18:58 ` Loreno Heer
2022-10-11 19:43 ` Andrea Corallo
2022-10-12 4:55 ` Eli Zaretskii
2022-10-12 7:13 ` Loreno Heer
2022-10-12 7:29 ` Eli Zaretskii
2022-10-12 10:35 ` Loreno Heer
2022-10-12 11:45 ` Andrea Corallo
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.