On 08/06/2012 11:09, Heino Tiedemann wrote:
Maciej Suszko<mac...@suszko.eu>  wrote:

Heino Tiedemann<rotkaps_spam_t...@gmx.de>  wrote:

What ist the meaning of

,----
| Use GCC 4.6 to fix build on newer FreeBSD versions
`----


What meians "newer FreeBSD versions" here?
http://www.freshports.org/www/firefox/


And what means

,----
| Don't depend on GCC 4.6 if clang is used
`----


How an I use clang?
http://www.freshports.org/www/firefox/


I just simply built www/firefox with those flags to make:
CC=clang CXX=clang++ CPP=clang-cpp

If you use portupgrade, this should work:
portupgrade -m 'CC=clang CXX=clang++ CPP=clang-cpp' firefox\*

does not work :(

clang++ -o nsUTF8UtilsSSE2.o -c  -fvisibility=hidden -DMOZ_GLUE_IN_PROGRAM 
-DMOZILLA_INTERNlude -I../../../dist/include/nsprpub -I/usr/local/include  
-I/usr/local/include/nspr -I/usr  -I/usr/local/include -fno-rtti 
-Qunused-arguments -Wall -Wpointer-arith -Woverloaded-virtid-offsetof 
-Wno-variadic-macros -Werror=return-type -Wno-unknown-warning-option 
-Wno-retur-std=gnu++0x -ffunction-sections -fdata-sections -pipe  -DNDEBUG 
-DTRIMMED -fno-omit-frame-/../../mozilla-config.h 
/usr/ports/www/firefox/work/mozilla-release/xpcom/string/src/nsUTF8
In file included from 
/usr/ports/www/firefox/work/mozilla-release/xpcom/string/src/nsUTF8UtilsSSE2.cpp:3:
In file included from /usr/include/clang/3.0/emmintrin.h:31:
In file included from /usr/include/clang/3.0/xmmintrin.h:31:
/usr/include/clang/3.0/mmintrin.h:28:2: error: #error "MMX instruction set not 
enabled"
#error "MMX instruction set not enabled"
  ^
In file included from 
/usr/ports/www/firefox/work/mozilla-release/xpcom/string/src/nsUTF8UtilsSSE2.cpp:3:
In file included from /usr/include/clang/3.0/emmintrin.h:31:
/usr/include/clang/3.0/xmmintrin.h:417:19: error: unknown type name '__m64'
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
                   ^
/usr/include/clang/3.0/xmmintrin.h:417:25: error: expected unqualified-id
static __inline__ __m64 __attribute__((__always_inline__, __nodebug__))
                         ^
In file included from 
/usr/ports/www/firefox/work/mozilla-release/xpcom/string/src/nsUTF8UtilsSSE2.cpp:3:
/usr/include/clang/3.0/emmintrin.h:42:19: error: unknown type name '__m128d'
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
                   ^
/usr/include/clang/3.0/emmintrin.h:42:27: error: expected unqualified-id
static __inline__ __m128d __attribute__((__always_inline__, __nodebug__))
                           ^
In file included from 
/usr/ports/www/firefox/work/mozilla-release/xpcom/string/src/nsUTF8UtilsSSE2.cpp:4:
../../../dist/include/nsUTF8Utils.h:90:10: error: use of undeclared identifier 
'UTF8traits'
     if ( UTF8traits::isASCII(c) )
          ^
../../../dist/include/nsUTF8Utils.h:146:10: error: use of undeclared identifier 
'UTF8traits'
     if ( UTF8traits::is2byte(c) )
          ^
../../../dist/include/nsUTF8Utils.h:152:15: error: use of undeclared identifier 
'UTF8traits'
     else if ( UTF8traits::is3byte(c) )
               ^
../../../dist/include/nsUTF8Utils.h:158:15: error: use of undeclared identifier 
'UTF8traits'
     else if ( UTF8traits::is4byte(c) )
               ^
../../../dist/include/nsUTF8Utils.h:164:15: error: use of undeclared identifier 
'UTF8traits'
     else if ( UTF8traits::is5byte(c) )
               ^
../../../dist/include/nsUTF8Utils.h:170:15: error: use of undeclared identifier 
'UTF8traits'
     else if ( UTF8traits::is6byte(c) )
               ^
../../../dist/include/nsUTF8Utils.h:186:10: error: use of undeclared identifier 
'UTF8traits'
     if ( UTF8traits::isInSeq(c) )
          ^
../../../dist/include/nsUTF8Utils.h:393:18: error: use of undeclared identifier 
'UTF8traits'
             if ( UTF8traits::isASCII(*p) )
                  ^
../../../dist/include/nsUTF8Utils.h:395:23: error: use of undeclared identifier 
'UTF8traits'
             else if ( UTF8traits::is2byte(*p) )
                       ^
../../../dist/include/nsUTF8Utils.h:397:23: error: use of undeclared identifier 
'UTF8traits'
             else if ( UTF8traits::is3byte(*p) )
                       ^
../../../dist/include/nsUTF8Utils.h:399:23: error: use of undeclared identifier 
'UTF8traits'
             else if ( UTF8traits::is4byte(*p) ) {
                       ^
../../../dist/include/nsUTF8Utils.h:442:23: error: use of undeclared identifier 
'UTF8traits'
             else if ( UTF8traits::is5byte(*p) )
                       ^
../../../dist/include/nsUTF8Utils.h:444:23: error: use of undeclared identifier 
'UTF8traits'
             else if ( UTF8traits::is6byte(*p) )
                       ^
../../../dist/include/nsUTF8Utils.h:686:24: error: no member named 
'supports_sse2' in namespace 'mozilla'
           if (mozilla::supports_sse2())
               ~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
gmake[5]: *** [nsUTF8UtilsSSE2.o] Error 1
gmake[5]: Leaving directory 
`/usr/ports/www/firefox/work/mozilla-release/xpcom/string/src'
gmake[4]: *** [libs] Error 2
gmake[4]: Leaving directory 
`/usr/ports/www/firefox/work/mozilla-release/xpcom/string'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release/xpcom'
gmake[2]: *** [libs_tier_platform] Error 2
gmake[2]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release'
gmake[1]: *** [tier_platform] Error 2
gmake[1]: Leaving directory `/usr/ports/www/firefox/work/mozilla-release'
gmake: *** [default] Error 2
*** Error code 1

Stop in /usr/ports/www/firefox.
*** Error code 1

Stop in /usr/ports/www/firefox.

This may be related to clang treating mmx and sse separately, in some of the Makefiles such as at xpcom/string/src/Makefile.in there are CXXFLAGS+=-msse2 assignments without mmx which appears to be the issue, after adding CFLAGS+= -mmmx to the port Makefile firefox appears to be building ok, it'll be some hours om my ancient machine before it finishes and I'm able to test.

Hope this is of some help,
Alan
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to