#6 Cannot compile with -DOPTIMIZE_SSE2 CFLAGS

open
nobody
None
5
2006-06-14
2006-06-14
Alexander Skwar
No

I'm failing to get beecrypt 4.1.2 compiled on Gentoo
Linux with SSE2 support. On Gentoo, when SSE2 support
is asked for, a "-DOPTIMIZE_SSE2" gets added to the
CFLAGS. When beecrypt then gets compiled, it fails like
this:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.
-I./.. -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DOPTIMIZE_I686 -O2
-mtune=pentium-m -pipe
-fomit-frame-pointer -DOPTIMIZE_MMX -DOPTIMIZE_SSE
-DOPTIMIZE_SSE2 -Wall -c
sha384.c -fPIC -DPIC -o .libs/sha384.o
sha384.c: In function 'sha384Process':
sha384.c:125: error: expected '=', ',', ';', 'asm' or
'__attribute__' before
'MASK'
sha384.c:125: error: 'MASK' undeclared (first use in
this function)
sha384.c:125: error: (Each undeclared identifier is
reported only once
sha384.c:125: error: for each function it appears in.)
sha384.c:132: error: '__m64' undeclared (first use in
this function)
sha384.c:132: error: expected ';' before 'a'
sha384.c:133: error: expected '=', ',', ';', 'asm' or
'__attribute__' before
'*' token
sha384.c:133: error: 'w' undeclared (first use in this
function)
sha384.c:137: error: expected expression before ')' token
sha384.c:141: error: 'temp' undeclared (first use in
this function)
sha384.c:142: warning: implicit declaration of function
'_m_pxor'
sha384.c:143: warning: implicit declaration of function
'_mm_slli_si64'
sha384.c:143: warning: implicit declaration of function
'_m_pshufw'
sha384.c:143: warning: implicit declaration of function
'_m_pand'
sha384.c:144: warning: implicit declaration of function
'_mm_srli_si64'
sha384.c:151: warning: implicit declaration of function
'_mm_add_si64'
sha384.c:155: error: expected expression before ')' token
sha384.c:157: error: 'a' undeclared (first use in this
function)
sha384.c:157: error: 'b' undeclared (first use in this
function)
sha384.c:157: error: 'c' undeclared (first use in this
function)
sha384.c:157: error: 'd' undeclared (first use in this
function)
sha384.c:158: error: 'e' undeclared (first use in this
function)
sha384.c:158: error: 'f' undeclared (first use in this
function)
sha384.c:158: error: 'g' undeclared (first use in this
function)
sha384.c:158: error: 'h' undeclared (first use in this
function)
sha384.c:160: error: expected expression before ')' token
sha384.c:161: error: 'k' undeclared (first use in this
function)
sha384.c:161: error: expected expression before ')' token
sha384.c:197: warning: implicit declaration of function
'_m_por'
sha384.c:279: error: expected expression before ')' token
sha384.c:288: warning: implicit declaration of function
'_mm_empty'
make[2]: *** [sha384.lo] Fehler 1
make[2]: Leaving directory
`/Gentoo/Portage/build/portage/beecrypt-4.1.2-r1/work/beecrypt-4.1.2'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory
`/Gentoo/Portage/build/portage/beecrypt-4.1.2-r1/work/beecrypt-4.1.2'
make: *** [all] Fehler 2

I reported this to the Gentoo bugzilla as well; please
see https://bugs.gentoo.org/show_bug.cgi?id=136325

Discussion

  • Logged In: YES
    user_id=600513

    This bug depends on how configure.ac detects pentium-m as
    arch. The configure.ac can't work correctly if arch is
    athlon64 (because it sees the string as athlon) and pentium-m.
    As a workaround can be specified k8 instead of athlon64 and
    pentium3 instead of pentium-m. But the configure.ac needs to
    be rewritten, it actually doesn't work.