tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: -march=native

On Mon, Feb 06, 2017 at 11:40:14AM +0100, Thomas Klausner wrote:
> Why doesn't NetBSD's gcc support -march=native?
> "error: bad value (native) for -march= switch"

Works with pkgsrc GCC. I think this mgiht be the responsible

101 case ${host} in
118   i[34567]86-*-* \
119   | x86_64-*-* )
120     case ${target} in
121       i[34567]86-*-* \
122       | x86_64-*-* )
123         host_extra_gcc_objs="driver-i386.o"                                                                                              
124         host_xmake_file="${host_xmake_file} i386/x-i386"

I think I need mknative for this change to take effect,
but maybe it should be case ${target} (we're cross compiling)?

Also why we need this workaround:

2412 #if defined(__arm__) && defined(__linux__)                                                                                              
2413 extern const char *host_detect_local_cpu (int argc, const char **argv);

(original is 'if defined(__arm__)')

right above here, in the same file:
101 case ${host} in
102   arm*-*-freebsd* | arm*-*-linux*)
103     case ${target} in
104       arm*-*-*)
105         host_extra_gcc_objs="driver-arm.o"                                                                                               
106         host_xmake_file="${host_xmake_file} arm/x-arm"

However I think I need a mknative run to change this?

Home | Main Index | Thread Index | Old Index