error: unknown target CPU 'pentium-m'

It’s hard to guess what you’re doing or what your expected outcome is without seeing your command line, but perhaps you’re using -march?

    $ clang -march=pentium-m main.c
    error: unknown target CPU 'pentium-m’
    $ clang -mtune=pentium-m main.c
    $

Hi,

It’s hard to guess what you’re doing or what your
expected outcome is without seeing your command
line,

I am building ungoogled-chromium using the attached
short bash script. For 'native' and 'nocona'
everything works fine. The errors when selecting
'pentium-m' are here:

https://susepaste.org/7e63b193

but perhaps you’re using -march?

Yes, through exporting CFLAGS.

    $ clang -march=pentium-m main.c
    error: unknown target CPU 'pentium-m’
    $ clang -mtune=pentium-m main.c
    $

So one cannot target architecture 'pentium-m' yet
-mtune for it is possible for that CPU? How can this
be used practically? IOW: how should I modify my
script?

ugc-build (2.27 KB)

Also see https://lists.llvm.org/pipermail/cfe-dev/2016-March/048049.html

Also see
https://lists.llvm.org/pipermail/cfe-dev/2016-March/048049.html

Thanks. Unfortunately that still doesn't answer the
question. It says:

The -mcpu and -march options are very similar in
clang. In general, they're setting the processor
you're compiling your code to run on.

The reasons behind this are largely historical and
option compatibility with gcc.

Still '-march=pentium-m' (which is available for gcc)
is not recognized by clang. So I am afraid I don't
know how to use this info practically.

I have also seen:

https://clang.llvm.org/docs/CrossCompilation.html#general-cross-compilation-options-in-clang

but it is still not clear what hides behind those
"etc". It doesn't even mention -march and there no
clear list of what one can use for -mcpu. This is
very confusing.

I found this info:

https://stackoverflow.com/a/35061913

which suggests running:

$ llc --version
(to show supported architectures)

$ llc -march=ARCH -mattr=help
(to list "available CPUs" and "available features")

So I found for my case:

$ llc -march=x86 -mattr=help
Available CPUs for this target:
...
pentium-m - Select the pentium-m processor.
...

And I modified my script to use:

CFLAGS='-O3 -march=x86 -mtune=pentium-m'

Unfortunately clang complains again:

error: unknown target CPU 'x86'
note: valid target CPU values are: (same old list)

I hope someone can shed some light on all this. There
seem to be others complaining from the lack of info.

I still hope for some help.
Or where should I ask please?