Re: Portability: common-src/amcrc32chw.c & config/amanda/amanda_configure.m4

[email protected] (Eric Schnoebelen)
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
I was able to successfully compile using the attached patch.


Jean-Louis Martineau writes:
- On 03/01/17 05:14 PM, Eric Schnoebelen wrote:
- > Jean-Louis Martineau writes:
- > - amanda detect at run time if the sse4.2 instruction are available and
- > - use them only if they are available.
- > - different code is used if the sse4.2 instruction are not available.
- > - What's wrong with that?
- >
- > Backing up.
- >
- > The original code *assumed* that if you were using GCC and it
- > was at least 4.3 on any x86 processor architecture, the
- > __builtin_ia32_* functions would be available.
- >
- > However, as you've stated, that is only true if the compliler is
- > called with the ``-msse4.2'' (or other -msse* flags?).
- >
- > And amanda *assumed* it was being compiled with the ``-msse4.2''
- > (or similar) flag.
-
- That's the problem, you removed the flag
-
- > pkgsrc explicitly strips such flags from compile tests for
- > maximal portability for it's binary builds across systems.
-
- As I already said, even if the binary have sse4.2 instructions, they are=20
- executed only if the CPU have it, there is a runtime check for there=20
- availability.
-
- >
- > Given that gcc wasn't given ``-msse4.2'' on the complile/load
- > command line, the __builtin_ia32_* functions were unable to be
- > resolved at link time.
- >
- > Summary: amanda was blindly using (builtin) library routines
- > with out insuring that they were resolvable at compile/link
- > time.  My original patch at least tested for their existence and
- > didn't try to use that code path if a compile test for the
- > functions failed.
-
- Your patch never detected them.
-
- >
- > - If I understand, you want an option to completely disable sse4.2?
- > - You do not want newer CPU to use sse4.2
- > - I don't understand since amanda detect sse4.2 at run time.
- >
- > See above about amanda in pkgsrc not getting the compile time
- > compiler flag detection.
- >
- > Effectively, pkgsrc isn't allowing the ``-msse4.2'' flag through
- > to the test cases to expose the associated builtins.
- >
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.