clang error make buildworld

2017-08-11 Thread Aijaz Baig
I am tying to buildworld on an ivybridge (amd64) machine and I get the
following error:

===> lib/libc/tests/ssp (all)
(cd /usr/src/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_fgets  NO_SUBDIR=1
make -f /usr/src/lib/libc/tests/ssp/Makefile _RECURSING_PROGS=t
 PROG=h_fgets )
(cd /usr/src/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_gets  NO_SUBDIR=1
make -f /usr/src/lib/libc/tests/ssp/Makefile _RECURSING_PROGS=t
 PROG=h_gets )
(cd /usr/src/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_getcwd
 NO_SUBDIR=1 make -f /usr/src/lib/libc/tests/ssp/Makefile
_RECURSING_PROGS=t  PROG=h_getcwd )
(cd /usr/src/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_memcpy
 NO_SUBDIR=1 make -f /usr/src/lib/libc/tests/ssp/Makefile
_RECURSING_PROGS=t  PROG=h_memcpy )
(cd /usr/src/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_memmove
 NO_SUBDIR=1 make -f /usr/src/lib/libc/tests/ssp/Makefile
_RECURSING_PROGS=t  PROG=h_memmove )
(cd /usr/src/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_memset
 NO_SUBDIR=1 make -f /usr/src/lib/libc/tests/ssp/Makefile
_RECURSING_PROGS=t  PROG=h_memset )
(cd /usr/src/lib/libc/tests/ssp &&  DEPENDFILE=.depend.h_raw  NO_SUBDIR=1
make -f /usr/src/lib/libc/tests/ssp/Makefile _RECURSING_PROGS=t  PROG=h_raw
)
cc -target x86_64-unknown-freebsd12.0 --sysroot=/mnt/ObjDir/usr/src/tmp
-B/mnt/ObjDir/usr/src/tmp/usr/bin -O0 -pipe -fstack-protector-all
-Wstack-protector -fsanitize=bounds -g -std=gnu99 -fstack-protector-strong
-Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign
-Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
-Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef
-Wno-address-of-packed-member -Wno-switch -Wno-switch-enum
-Wno-knr-promoted-parameter -Qunused-arguments  -o h_raw.full h_raw.o
/mnt/ObjDir/usr/src/tmp/usr/lib/libgcc_s.so: undefined reference to
`__gxx_personality_v0'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[7]: stopped in /usr/src/lib/libc/tests/ssp
*** Error code 1

Stop.
make[6]: stopped in /usr/src/lib/libc/tests/ssp
*** Error code 1

Stop.
make[5]: stopped in /usr/src/lib/libc/tests
*** Error code 1

Stop.
make[4]: stopped in /usr/src/lib/libc
*** Error code 1

Stop.
make[3]: stopped in /usr/src/lib
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

My /etc/make.conf contains:
CPUTYPE?= ivybridge

and whereas my /etc/src.conf contains:
CFLAGS= -O0 -pipe
COPTFLAGS= -O0 -pipe
DEBUG_FLAGS=-g

By the way it looks like clang is linking against gcc libraries?? How can
that be possible? I thought GCC and CLANG are more like competitors in the
world of compilers. Perhaps I am missing something here. Nevertheless how
do I get rid of this issue?

-- 

Best Regards,
Aijaz Baig
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Clang error make buildworld

2011-12-28 Thread Renato Botelho
On Tue, May 3, 2011 at 10:07 PM, Manfred Antar n...@pozo.com wrote:
 I get this error when trying to buildworld on current i386.
 It's been this way for awhile Any Ideas ?

 === boot/i386/boot0 (all)
 clang -O2 -pipe  -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f  -DTICKS=0xb6  
 -DCOMSPEED=7  5 + 3 -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx 
 -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99    -c 
 /usr/src/sys/boot/i386/boot0/boot0.S
 clang: warning: argument unused during compilation: 
 '-mpreferred-stack-boundary=2'
 /tmp/cc-4SXZt8.s:42:11: error: .code16 not supported yet
  .code16 # This runs in real mode
          ^
 /tmp/cc-4SXZt8.s:313:3: error: unknown use of instruction mnemonic without a 
 size suffix
  jmp *%bx # Invoke bootstrap
  ^
 /tmp/cc-4SXZt8.s:346:3: error: invalid operand for instruction
  retw # To caller
  ^
 /tmp/cc-4SXZt8.s:372:3: error: invalid operand for instruction
  retw # To caller
  ^
 *** Error code 1

 Stop in /usr/src/sys/boot/i386/boot0.
 *** Error code 1

 Stop in /usr/src/sys/boot/i386.
 *** Error code 1

 Stop in /usr/src/sys/boot.
 *** Error code 1

 Stop in /usr/src/sys.

Hello Manfred,

I'm having this same issue on a i386 HEAD buildworld with clang. Did
you find a fix for this?

For now i built boot0 with gcc and it was built fine.

Regards
-- 
Renato Botelho
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-12-28 Thread Dimitry Andric

On 2011-12-28 16:44, Renato Botelho wrote:

On Tue, May 3, 2011 at 10:07 PM, Manfred Antarn...@pozo.com  wrote:

I get this error when trying to buildworld on current i386.
It's been this way for awhile Any Ideas ?

===  boot/i386/boot0 (all)
clang -O2 -pipe  -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f  -DTICKS=0xb6  -DCOMSPEED=7  
5 + 3 -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 
-mno-sse3 -msoft-float -std=gnu99-c /usr/src/sys/boot/i386/boot0/boot0.S
clang: warning: argument unused during compilation: 
'-mpreferred-stack-boundary=2'
/tmp/cc-4SXZt8.s:42:11: error: .code16 not supported yet
  .code16 # This runs in real mode
  ^


This is expected, since the above command line is supposed to have
'-no-integrated-as' added.  For some reason, the test for clang in
sys/boot/i386/boot0/Makefile is not working as it should.

Most likely, it is due to the way you set CC, CXX and/or CPP in
make.conf.  Can you please post that file?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-12-28 Thread Renato Botelho
On Wed, Dec 28, 2011 at 2:26 PM, Dimitry Andric d...@freebsd.org wrote:
 On 2011-12-28 16:44, Renato Botelho wrote:

 On Tue, May 3, 2011 at 10:07 PM, Manfred Antarn...@pozo.com  wrote:

 I get this error when trying to buildworld on current i386.
 It's been this way for awhile Any Ideas ?

 ===  boot/i386/boot0 (all)
 clang -O2 -pipe  -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f  -DTICKS=0xb6
  -DCOMSPEED=7  5 + 3 -ffreestanding -mpreferred-stack-boundary=2
  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99
  -c /usr/src/sys/boot/i386/boot0/boot0.S
 clang: warning: argument unused during compilation:
 '-mpreferred-stack-boundary=2'
 /tmp/cc-4SXZt8.s:42:11: error: .code16 not supported yet
  .code16 # This runs in real mode
          ^


 This is expected, since the above command line is supposed to have
 '-no-integrated-as' added.  For some reason, the test for clang in
 sys/boot/i386/boot0/Makefile is not working as it should.

 Most likely, it is due to the way you set CC, CXX and/or CPP in
 make.conf.  Can you please post that file?

Sure, follow my src.conf:

.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
.if !defined(CPP) || ${CPP} == cpp
CPP=clang-cpp
.endif
# Don't die on warnings
NO_WERROR=
WERROR=
# Don't forget this when using Jails!
NO_FSCHG=

and my make.conf

KERNCONF=MURPHYS

WITH_OPTIONS=yes
WITH_VIM_OPTIONS=yes
WITHOUT_X11=yes

# added by use.perl 2011-12-12 13:19:26
PERL_VERSION=5.12.4

More information about the system installed on this machine:

garga@murphys:~ uname -a
FreeBSD murphys.ramenzoni.com.br 9.0-RC3 FreeBSD 9.0-RC3 #0: Sun Dec
4 08:01:02 UTC 2011
r...@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
garga@murphys:~ clang -v
FreeBSD clang version 3.0 (branches/release_30 142614) 20111021
Target: i386-unknown-freebsd9.0
Thread model: posix


-- 
Renato Botelho
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-12-28 Thread Dimitry Andric

On 2011-12-28 17:32, Renato Botelho wrote:

On Wed, Dec 28, 2011 at 2:26 PM, Dimitry Andricd...@freebsd.org  wrote:

...

Most likely, it is due to the way you set CC, CXX and/or CPP in
make.conf.  Can you please post that file?


Sure, follow my src.conf:

.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
.if !defined(CPP) || ${CPP} == cpp
CPP=clang-cpp
.endif


This part should go into make.conf, *not* src.conf.  If you want to use
clang only for src, not for anything else, put:

.if ${.CURDIR:M/usr/src*} || ${.CURDIR:M/usr/obj*}
# [... set CC, etc here... ]
.endif



# Don't die on warnings
NO_WERROR=
WERROR=
# Don't forget this when using Jails!
NO_FSCHG=


This is fine to have in src.conf.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-12-28 Thread Renato Botelho
On Wed, Dec 28, 2011 at 2:39 PM, Dimitry Andric d...@freebsd.org wrote:
 On 2011-12-28 17:32, Renato Botelho wrote:

 On Wed, Dec 28, 2011 at 2:26 PM, Dimitry Andricd...@freebsd.org  wrote:

 ...

 Most likely, it is due to the way you set CC, CXX and/or CPP in
 make.conf.  Can you please post that file?


 Sure, follow my src.conf:

 .if !defined(CC) || ${CC} == cc
 CC=clang
 .endif
 .if !defined(CXX) || ${CXX} == c++
 CXX=clang++
 .endif
 .if !defined(CPP) || ${CPP} == cpp
 CPP=clang-cpp
 .endif


 This part should go into make.conf, *not* src.conf.  If you want to use
 clang only for src, not for anything else, put:

 .if ${.CURDIR:M/usr/src*} || ${.CURDIR:M/usr/obj*}
 # [... set CC, etc here... ]

 .endif


 # Don't die on warnings
 NO_WERROR=
 WERROR=
 # Don't forget this when using Jails!
 NO_FSCHG=


 This is fine to have in src.conf.

Worked like a charm. Thanks!!

-- 
Renato Botelho
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-06 Thread Pan Tsu
Olivier Smedts oliv...@gid0.org writes:

 2011/5/5 Roman Divacky rdiva...@freebsd.org:
 Because with clang, -march=native often breaks buildworld, while
 -march=core2 is ok.

 Can you be more specific about this claim? On what CPU are seeing
 this breakage?

 Ok, with latest HEAD...

 %echo | gcc -march=native -E -v -x c -### -
 Using built-in specs.
 Target: amd64-undermydesk-freebsd
 Configured with: FreeBSD/amd64 system compiler
 Thread model: posix
 gcc version 4.2.2 20070831 prerelease [FreeBSD]
  /usr/libexec/cc1 -E -quiet -v -D_LONGLONG -
 -march=core2 -mtune=generic

 With -march=native, gcc adds -mtune=generic while the man pages
 says -march=xxx sets -mtune=xxx.

No longer true for `-march=native' on more recent GCC versions.

  $ gcc46 -v -march=native foo.c | fgrep cc1 # C2D E8400
   ...-march=core2 -mcx16 -msahf -msse4.1 --param l1-cache-size=32
   --param l1-cache-line-size=64 --param l2-cache-size=6144
   -mtune=core2...

  $ gcc46 -v -march=core2 foo.c | fgrep cc1
   ...-march=core2...

  $ clang -v -march=native foo.c | grep -o -- '-target-cpu \w*'
  -target-cpu penryn
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread O. Hartmann

On 05/04/11 16:20, Dimitry Andric wrote:

On 2011-05-04 15:44, Manfred Antar wrote:
...

src.conf:

WITHOUT_DYNAMICROOT=yes
WITH_IDEA=yes
.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
#Don't die on warnings
NO_WERROR=
WERROR=


Aha. Please move the clang-related stuff to make.conf instead, e.g.
this fragment:

.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
#Don't die on warnings
NO_WERROR=
WERROR=




On a notebook (DELL Latitude E6510) I tried compiling world with CLANG. 
So far, so good. It worked. But after rebooting I got a strange 
misbehaviour of the xdm login window (black/white instead of coloured), 
but this was only some superficial symptome. The whole system seems to 
be corrupted. Hitting tab key results like hitting exit in the console. 
The gcc 4.2.1 system compiler isn't capable of producing binaries, see 
message below. At this very moment, the box isn't usable anymore, I 
can't even compile a world with cc (see error below, that was generated 
by trying to compile a kernel and I'm really confused why cc is used 
instead of clang).


Well, the boxes I reported errors from prior to this are desktop systems 
with nVidia (Fermi based) graphics boards using a driver BLOB 270.XX.XX 
which is also used by the notebook.


The desktop boxes uses C2D based intel chips, the notebook uses a 
Core-i5 based chip. All systems got compiled with option


CPUTYPE?=native

I guess the first compilation with CLANG destroyed the base' system 
compiler, at this moment I'm incapable of switching back. Floating like 
a dead man in the water.



Any suggestions?

Regards and thanks in advance,
Oliver
---
awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -h
awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -d
rpcgen -hM /usr/src/sys/kgssapi/gssd.x | grep -v pthread.h  gssd.h
cc1: internal compiler error: Bus error: 10
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.
rpcgen -c /usr/src/sys/kgssapi/gssd.x -o gssd_xdr.c
cc1: internal compiler error: Bus error: 10
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.
*** Error code 1

Stop in /usr/obj/usr/src/sys/MUNIN.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread Olivier Smedts
2011/5/5 O. Hartmann ohart...@zedat.fu-berlin.de:
 On 05/04/11 16:20, Dimitry Andric wrote:

 On 2011-05-04 15:44, Manfred Antar wrote:
 ...

 src.conf:

 WITHOUT_DYNAMICROOT=yes
 WITH_IDEA=yes
 .if !defined(CC) || ${CC} == cc
 CC=clang
 .endif
 .if !defined(CXX) || ${CXX} == c++
 CXX=clang++
 .endif
 #Don't die on warnings
 NO_WERROR=
 WERROR=

 Aha. Please move the clang-related stuff to make.conf instead, e.g.
 this fragment:

 .if !defined(CC) || ${CC} == cc
 CC=clang
 .endif
 .if !defined(CXX) || ${CXX} == c++
 CXX=clang++
 .endif
 #Don't die on warnings
 NO_WERROR=
 WERROR=



 On a notebook (DELL Latitude E6510) I tried compiling world with CLANG. So
 far, so good. It worked. But after rebooting I got a strange misbehaviour of
 the xdm login window (black/white instead of coloured), but this was only
 some superficial symptome. The whole system seems to be corrupted. Hitting
 tab key results like hitting exit in the console. The gcc 4.2.1 system
 compiler isn't capable of producing binaries, see message below. At this
 very moment, the box isn't usable anymore, I can't even compile a world with
 cc (see error below, that was generated by trying to compile a kernel and
 I'm really confused why cc is used instead of clang).

 Well, the boxes I reported errors from prior to this are desktop systems
 with nVidia (Fermi based) graphics boards using a driver BLOB 270.XX.XX
 which is also used by the notebook.

 The desktop boxes uses C2D based intel chips, the notebook uses a Core-i5
 based chip. All systems got compiled with option

 CPUTYPE?=native

Can you try without CPUTYPE native, or with another value ?
native is not a supported value in /usr/share/mk/bsd.cpu.mk

With gcc I used :
CPUTYPE?=core2
CFLAGS=-O2 -pipe -march=native
NO_CPU_CFLAGS=yes
COPTFLAGS=-O2 -pipe -march=native
NO_CPU_COPTFLAGS=yes

So that /usr/share/mk/bsd.cpu.mk could set the right variables and I
could set my own -march value in CFLAGS for gcc.

But now for HEAD (which has a newer gcc and clang) I use :
CPUTYPE?=core2
CFLAGS=-O2 -pipe -march=core2
NO_CPU_CFLAGS=yes
COPTFLAGS=-O2 -pipe -march=core2
NO_CPU_COPTFLAGS=yes

Because with clang, -march=native often breaks buildworld, while
-march=core2 is ok.

First, try to see if you buildworld is still broken with a different
(or empty!) make.conf.

 I guess the first compilation with CLANG destroyed the base' system
 compiler, at this moment I'm incapable of switching back. Floating like a
 dead man in the water.


 Any suggestions?

 Regards and thanks in advance,
 Oliver
 ---
 awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -h
 awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -d
 rpcgen -hM /usr/src/sys/kgssapi/gssd.x | grep -v pthread.h  gssd.h
 cc1: internal compiler error: Bus error: 10
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See URL:http://gcc.gnu.org/bugs.html for instructions.
 rpcgen -c /usr/src/sys/kgssapi/gssd.x -o gssd_xdr.c
 cc1: internal compiler error: Bus error: 10
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See URL:http://gcc.gnu.org/bugs.html for instructions.
 *** Error code 1

 Stop in /usr/obj/usr/src/sys/MUNIN.
 *** Error code 1

 Stop in /usr/src.
 *** Error code 1

 Stop in /usr/src.
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org




-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: oliv...@gid0.org        - against HTML email  vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread Roman Divacky
 Because with clang, -march=native often breaks buildworld, while
 -march=core2 is ok.

Can you be more specific about this claim? On what CPU are seeing
this breakage?

Anyway, can you compile and run on that machine this:

http://lev.vlakno.cz/~rdivacky/Host.cpp

It's the LLVM CPU autodetection code, it will print the name of
your CPU. I wonder whats the difference to core2.

Thank you. roman
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread Olivier Smedts
2011/5/5 Roman Divacky rdiva...@freebsd.org:
 Because with clang, -march=native often breaks buildworld, while
 -march=core2 is ok.

 Can you be more specific about this claim? On what CPU are seeing
 this breakage?

On a Core2 Quad Q9450 and a Core i7 860.
I use core2 on both because that's the most approaching values
supported in bsd.cpu.mk and gcc in HEAD.
I reverted from -march=native to -march=core2 for two reasons, the
first beeing that gcc didn't use the right -mtune when using
-march=native (I think it was using internally -mtune=generic).
I'll try to be more specific if I can find the tests I was using at
that time. The second reason is that with -march=native, my
buildworld often failed with clang, and since I use -march=core2 I
had no issues. I'll try to buildworld with -march=native and report
back.

 Anyway, can you compile and run on that machine this:

        http://lev.vlakno.cz/~rdivacky/Host.cpp

Compiled with gcc and clang, both output (on one of the two computers
I use most) :
roman = corei7

 It's the LLVM CPU autodetection code, it will print the name of
 your CPU. I wonder whats the difference to core2.

 Thank you. roman

Cheers

-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: oliv...@gid0.org        - against HTML email  vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread O. Hartmann

On 05/05/11 15:46, Olivier Smedts wrote:

2011/5/5 O. Hartmannohart...@zedat.fu-berlin.de:

On 05/04/11 16:20, Dimitry Andric wrote:


On 2011-05-04 15:44, Manfred Antar wrote:
...


src.conf:

WITHOUT_DYNAMICROOT=yes
WITH_IDEA=yes
.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
#Don't die on warnings
NO_WERROR=
WERROR=


Aha. Please move the clang-related stuff to make.conf instead, e.g.
this fragment:

.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
#Don't die on warnings
NO_WERROR=
WERROR=




On a notebook (DELL Latitude E6510) I tried compiling world with CLANG. So
far, so good. It worked. But after rebooting I got a strange misbehaviour of
the xdm login window (black/white instead of coloured), but this was only
some superficial symptome. The whole system seems to be corrupted. Hitting
tab key results like hitting exit in the console. The gcc 4.2.1 system
compiler isn't capable of producing binaries, see message below. At this
very moment, the box isn't usable anymore, I can't even compile a world with
cc (see error below, that was generated by trying to compile a kernel and
I'm really confused why cc is used instead of clang).

Well, the boxes I reported errors from prior to this are desktop systems
with nVidia (Fermi based) graphics boards using a driver BLOB 270.XX.XX
which is also used by the notebook.

The desktop boxes uses C2D based intel chips, the notebook uses a Core-i5
based chip. All systems got compiled with option

CPUTYPE?=native


Can you try without CPUTYPE native, or with another value ?
native is not a supported value in /usr/share/mk/bsd.cpu.mk

With gcc I used :
CPUTYPE?=core2
CFLAGS=-O2 -pipe -march=native
NO_CPU_CFLAGS=yes
COPTFLAGS=-O2 -pipe -march=native
NO_CPU_COPTFLAGS=yes

So that /usr/share/mk/bsd.cpu.mk could set the right variables and I
could set my own -march value in CFLAGS for gcc.

But now for HEAD (which has a newer gcc and clang) I use :
CPUTYPE?=core2
CFLAGS=-O2 -pipe -march=core2
NO_CPU_CFLAGS=yes
COPTFLAGS=-O2 -pipe -march=core2
NO_CPU_COPTFLAGS=yes

Because with clang, -march=native often breaks buildworld, while
-march=core2 is ok.

First, try to see if you buildworld is still broken with a different
(or empty!) make.conf.



Well I would like to to as suggested, but I can not even build a 
system/kernel anymore. Using clang, the build process dies when it comes 
to rpcgen as shown below, it uses cc (fixed) and cc doen't work 
properly anymore.




I guess the first compilation with CLANG destroyed the base' system
compiler, at this moment I'm incapable of switching back. Floating like a
dead man in the water.


Any suggestions?

Regards and thanks in advance,
Oliver
---
awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -h
awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -d
rpcgen -hM /usr/src/sys/kgssapi/gssd.x | grep -v pthread.h  gssd.h
cc1: internal compiler error: Bus error: 10
Please submit a full bug report,
with preprocessed source if appropriate.
SeeURL:http://gcc.gnu.org/bugs.html  for instructions.
rpcgen -c /usr/src/sys/kgssapi/gssd.x -o gssd_xdr.c
cc1: internal compiler error: Bus error: 10
Please submit a full bug report,
with preprocessed source if appropriate.
SeeURL:http://gcc.gnu.org/bugs.html  for instructions.
*** Error code 1

Stop in /usr/obj/usr/src/sys/MUNIN.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.


___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread Olivier Smedts
2011/5/5 Roman Divacky rdiva...@freebsd.org:
 Because with clang, -march=native often breaks buildworld, while
 -march=core2 is ok.

 Can you be more specific about this claim? On what CPU are seeing
 this breakage?

Ok, with latest HEAD...

%echo | gcc -march=native -E -v -x c -### -
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.2 20070831 prerelease [FreeBSD]
 /usr/libexec/cc1 -E -quiet -v -D_LONGLONG -
-march=core2 -mtune=generic

With -march=native, gcc adds -mtune=generic while the man pages
says -march=xxx sets -mtune=xxx.

%echo | gcc -march=core2 -E -v -x c -### -
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.2 20070831 prerelease [FreeBSD]
 /usr/libexec/cc1 -E -quiet -v -D_LONGLONG - -march=core2

With -march=core2, gcc doesn't add -mtune=generic, so it should
use -mtune=core2 as suggested by its man page.

That's why I use -march=core2 for gcc. Now for clang...

With -march=core2, my buildworld compiles just fine on my Core2
Quad, whereas with -march=native (without -jX) if fails on :
=== libexec/atrun (all)
clang -O2 -pipe -march=native -fomit-frame-pointer
-DATJOB_DIR=\/var/at/jobs/\  -DLFILE=\/var/at/jobs/.lockfile\
-DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\  -DVERSION=\2.9\
-DDAEMON_UID=1 -DDAEMON_GID=1  -DDEFAULT_BATCH_QUEUE=\'E\'
-DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
-I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
-DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
-Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c
/usr/src/libexec/atrun/atrun.c
clang -O2 -pipe -march=native -fomit-frame-pointer
-DATJOB_DIR=\/var/at/jobs/\  -DLFILE=\/var/at/jobs/.lockfile\
-DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\  -DVERSION=\2.9\
-DDAEMON_UID=1 -DDAEMON_GID=1  -DDEFAULT_BATCH_QUEUE=\'E\'
-DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
-I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
-DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
-Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c
/usr/src/libexec/atrun/gloadavg.c
clang -O2 -pipe -march=native -fomit-frame-pointer
-DATJOB_DIR=\/var/at/jobs/\  -DLFILE=\/var/at/jobs/.lockfile\
-DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\  -DVERSION=\2.9\
-DDAEMON_UID=1 -DDAEMON_GID=1  -DDEFAULT_BATCH_QUEUE=\'E\'
-DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
-I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
-DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
-Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign  -o atrun atrun.o
gloadavg.o -lpam -lutil
clang: warning: argument unused during compilation: '-std=gnu99'
/usr/obj/usr/src/tmp/usr/lib/crt1.o: In function `_start':
/usr/src/lib/csu/amd64/crt1.c:(.text+0x5d): undefined reference to `atexit'
/usr/src/lib/csu/amd64/crt1.c:(.text+0x64): undefined reference to `_init_tls'
/usr/src/lib/csu/amd64/crt1.c:(.text+0x6e): undefined reference to `atexit'
/usr/src/lib/csu/amd64/crt1.c:(.text+0x88): undefined reference to `exit'
atrun.o: In function `perr':
/usr/src/libexec/atrun/atrun.c:(.text+0x65): undefined reference to `strlen'
/usr/src/libexec/atrun/atrun.c:(.text+0xac): undefined reference to `vwarn'
/usr/src/libexec/atrun/atrun.c:(.text+0xb6): undefined reference to `exit'
/usr/src/libexec/atrun/atrun.c:(.text+0xd5): undefined reference to `snprintf'
/usr/src/libexec/atrun/atrun.c:(.text+0xe6): undefined reference to `vsyslog'
/usr/src/libexec/atrun/atrun.c:(.text+0xf0): undefined reference to `exit'
atrun.o: In function `perrx':
/usr/src/libexec/atrun/atrun.c:(.text+0x19f): undefined reference to `vwarnx'
/usr/src/libexec/atrun/atrun.c:(.text+0x1a9): undefined reference to `exit'
/usr/src/libexec/atrun/atrun.c:(.text+0x1be): undefined reference to `vsyslog'
/usr/src/libexec/atrun/atrun.c:(.text+0x1c8): undefined reference to `exit'
atrun.o: In function `main':
/usr/src/libexec/atrun/atrun.c:(.text+0x224): undefined reference to `geteuid'
/usr/src/libexec/atrun/atrun.c:(.text+0x239): undefined reference to `getegid'
/usr/src/libexec/atrun/atrun.c:(.text+0x24a): undefined reference to `setegid'
/usr/src/libexec/atrun/atrun.c:(.text+0x255): undefined reference to `seteuid'
/usr/src/libexec/atrun/atrun.c:(.text+0x269): undefined reference to `openlog'
/usr/src/libexec/atrun/atrun.c:(.text+0x26f): undefined reference to `opterr'
/usr/src/libexec/atrun/atrun.c:(.text+0x292): undefined reference to `getopt'
/usr/src/libexec/atrun/atrun.c:(.text+0x2ac): undefined reference to `optarg'
/usr/src/libexec/atrun/atrun.c:(.text+0x2bb): undefined reference to `sscanf'
/usr/src/libexec/atrun/atrun.c:(.text+0x2e7): undefined reference to `__stderrp'
/usr/src/libexec/atrun/atrun.c:(.text+0x2fb): undefined reference to `fwrite'
/usr/src/libexec/atrun/atrun.c:(.text+0x305): undefined reference to `exit'

Re: Clang error make buildworld

2011-05-05 Thread Roman Divacky
 clang -O2 -pipe -march=native -fomit-frame-pointer
 -DATJOB_DIR=\/var/at/jobs/\  -DLFILE=\/var/at/jobs/.lockfile\
 -DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\  -DVERSION=\2.9\
 -DDAEMON_UID=1 -DDAEMON_GID=1  -DDEFAULT_BATCH_QUEUE=\'E\'
 -DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
 -I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
 -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
 -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c
 /usr/src/libexec/atrun/gloadavg.c
 clang -O2 -pipe -march=native -fomit-frame-pointer
 -DATJOB_DIR=\/var/at/jobs/\  -DLFILE=\/var/at/jobs/.lockfile\
 -DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\  -DVERSION=\2.9\
 -DDAEMON_UID=1 -DDAEMON_GID=1  -DDEFAULT_BATCH_QUEUE=\'E\'
 -DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
 -I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
 -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
 -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign  -o atrun atrun.o
 gloadavg.o -lpam -lutil
 clang: warning: argument unused during compilation: '-std=gnu99'
 /usr/obj/usr/src/tmp/usr/lib/crt1.o: In function `_start':
 /usr/src/lib/csu/amd64/crt1.c:(.text+0x5d): undefined reference to `atexit'


Can you invoke this very same command (ie. linking) with -### and show me?
Does it work when you try to link the same .o files without specifying
-march=native ?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread Olivier Smedts
2011/5/5 Roman Divacky rdiva...@freebsd.org:
 clang -O2 -pipe -march=native -fomit-frame-pointer
 -DATJOB_DIR=\/var/at/jobs/\  -DLFILE=\/var/at/jobs/.lockfile\
 -DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\  -DVERSION=\2.9\
 -DDAEMON_UID=1 -DDAEMON_GID=1  -DDEFAULT_BATCH_QUEUE=\'E\'
 -DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
 -I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
 -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
 -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c
 /usr/src/libexec/atrun/gloadavg.c
 clang -O2 -pipe -march=native -fomit-frame-pointer
 -DATJOB_DIR=\/var/at/jobs/\  -DLFILE=\/var/at/jobs/.lockfile\
 -DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\  -DVERSION=\2.9\
 -DDAEMON_UID=1 -DDAEMON_GID=1  -DDEFAULT_BATCH_QUEUE=\'E\'
 -DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
 -I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
 -DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
 -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign  -o atrun atrun.o
 gloadavg.o -lpam -lutil
 clang: warning: argument unused during compilation: '-std=gnu99'
 /usr/obj/usr/src/tmp/usr/lib/crt1.o: In function `_start':
 /usr/src/lib/csu/amd64/crt1.c:(.text+0x5d): undefined reference to `atexit'


 Can you invoke this very same command (ie. linking) with -### and show me?
 Does it work when you try to link the same .o files without specifying
 -march=native ?

I'm going to try. In the meantime, I did other tests on this machine,
which is detected by clang as -march=corei7.

Compiling this with the system's clang (which has been compiled with
-march=core2) and -march=core2 is OK.
Compiling this with the system's clang (which has been compiled with
-march=core2) and -march=native is OK.
Compiling this with the bootstrap clang (which has been compiled with
-march=native) and -march=native FAILS.

The problem seems to be inside the clang compiled with -march=native.
Next, I'm going to try with a bootstrap clang compiled with
-march=corei7.

-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: oliv...@gid0.org        - against HTML email  vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas.
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-05 Thread Olivier Smedts
2011/5/5 Roman Divacky rdiva...@freebsd.org:
 Can you invoke this very same command (ie. linking) with -### and show me?
 Does it work when you try to link the same .o files without specifying
 -march=native ?

My system has previously been compiled with clang and -march=core2.
It's a corei7.

With -march=native in make.conf, after the failed buildworld I cd in
/usr/obj/usr/src/libexec/atrun/ and :

# clang -O2 -pipe -march=native -fomit-frame-pointer
-DATJOB_DIR=\/var/at/jobs/\ -DLFILE=\/var/at/jobs/.lockfile\
-DLOADAVG_MX=1.5 -DATSPOOL_DIR=\/var/at/spool\ -DVERSION=\2.9\
-DDAEMON_UID=1 -DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\'
-DDEFAULT_AT_QUEUE=\'c\' -DPERM_PATH=\/var/at/\
-I/usr/src/libexec/atrun/../../usr.bin/at -I/usr/src/libexec/atrun
-DLOGIN_CAP -DPAM -std=gnu99 -fstack-protector -Wsystem-headers -Wall
-Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -o atrun atrun.o
gloadavg.o -lpam -lutil
clang: warning: argument unused during compilation: '-std=gnu99'

OK

# /usr/obj/usr/src/tmp/usr/bin/clang -O2 -pipe -march=native
-fomit-frame-pointer -DATJOB_DIR=\/var/at/jobs/\
-DLFILE=\/var/at/jobs/.lockfile\ -DLOADAVG_MX=1.5
-DATSPOOL_DIR=\/var/at/spool\ -DVERSION=\2.9\ -DDAEMON_UID=1
-DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\' -DDEFAULT_AT_QUEUE=\'c\'
-DPERM_PATH=\/var/at/\ -I/usr/src/libexec/atrun/../../usr.bin/at
-I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=gnu99
-fstack-protector -Wsystem-headers -Wall -Wno-format-y2k
-Wno-uninitialized -Wno-pointer-sign -o atrun atrun.o gloadavg.o -lpam
-lutil

FAIL (clang: error: linker command failed with exit code 1 (use -v to
see invocation))

# /usr/obj/usr/src/tmp/usr/bin/clang -O2 -pipe -march=native
-fomit-frame-pointer -DATJOB_DIR=\/var/at/jobs/\
-DLFILE=\/var/at/jobs/.lockfile\ -DLOADAVG_MX=1.5
-DATSPOOL_DIR=\/var/at/spool\ -DVERSION=\2.9\ -DDAEMON_UID=1
-DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\' -DDEFAULT_AT_QUEUE=\'c\'
-DPERM_PATH=\/var/at/\ -I/usr/src/libexec/atrun/../../usr.bin/at
-I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=gnu99
-fstack-protector -Wsystem-headers -Wall -Wno-format-y2k
-Wno-uninitialized -Wno-pointer-sign -o atrun atrun.o gloadavg.o -lpam
-lutil -###
FreeBSD clang version 3.0 (trunk 130700) 20110502
Target: x86_64-undermydesk-freebsd9.0
Thread model: posix
clang: warning: argument unused during compilation: '-std=gnu99'
 /usr/obj/usr/src/tmp/usr/bin/ld --eh-frame-hdr -dynamic-linker
/libexec/ld-elf.so.1 -o atrun
/usr/obj/usr/src/tmp/usr/lib/crt1.o
/usr/obj/usr/src/tmp/usr/lib/crti.o
/usr/obj/usr/src/tmp/usr/lib/crtbegin.o
-L/usr/obj/usr/src/tmp/usr/lib atrun.o gloadavg.o -lpam
-lutil -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/usr/obj/usr/src/tmp/usr/lib/crtend.o
/usr/obj/usr/src/tmp/usr/lib/crtn.o

Using the bootstrap clang (compiled with -march=native) and trying to
compile atrun, this time using -march=core2 :

# /usr/obj/usr/src/tmp/usr/bin/clang -O2 -pipe -march=core2
-fomit-frame-pointer -DATJOB_DIR=\/var/at/jobs/\
-DLFILE=\/var/at/jobs/.lockfile\ -DLOADAVG_MX=1.5
-DATSPOOL_DIR=\/var/at/spool\ -DVERSION=\2.9\ -DDAEMON_UID=1
-DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\' -DDEFAULT_AT_QUEUE=\'c\'
-DPERM_PATH=\/var/at/\ -I/usr/src/libexec/atrun/../../usr.bin/at
-I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=gnu99
-fstack-protector -Wsystem-headers -Wall -Wno-format-y2k
-Wno-uninitialized -Wno-pointer-sign -o atrun atrun.o gloadavg.o -lpam
-lutil

FAIL (same error)

When trying to compile the Host.cpp you provided (which compiled
fine with my system's clang and gcc), still with the bootstrap clang :

# /usr/obj/usr/src/tmp/usr/bin/clang -v Host.cpp
FreeBSD clang version 3.0 (trunk 130700) 20110502
Target: x86_64-undermydesk-freebsd9.0
Thread model: posix
 /usr/obj/usr/src/tmp/usr/bin/clang -cc1 -triple
x86_64-undermydesk-freebsd9.0 -emit-obj -mrelax-all -disable-free
-main-file-name Host.cpp -mrelocation-model static -mdisable-fp-elim
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -v -resource-dir
/usr/obj/usr/src/tmp/usr/bin/../lib/clang/3.0 -fdeprecated-macro
-ferror-limit 19 -fmessage-length 236 -fcxx-exceptions -fexceptions
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/cc-6ijoGC.o -x c++ Host.cpp
clang -cc1 version 3.0 based upon llvm 3.0svn hosted on
x86_64-undermydesk-freebsd9.0
ignoring nonexistent directory
/usr/obj/usr/src/tmp/usr/include/c++/4.2/backward/backward
ignoring nonexistent directory
/usr/obj/usr/src/tmp/usr/bin/../lib/clang/3.0/include
ignoring duplicate directory /usr/obj/usr/src/tmp/usr/include/c++/4.2
ignoring duplicate directory /usr/obj/usr/src/tmp/usr/include/c++/4.2/backward
ignoring duplicate directory /usr/obj/usr/src/tmp/usr/include/c++/4.2/backward
#include ... search starts here:
#include ... search starts here:
 /usr/obj/usr/src/tmp/usr/include/c++/4.2
 /usr/obj/usr/src/tmp/usr/include/c++/4.2/backward
 /usr/obj/usr/src/tmp/usr/include/clang/3.0
 /usr/obj/usr/src/tmp/usr/include

Re: Clang error make buildworld

2011-05-05 Thread Roman Divacky
 # /usr/obj/usr/src/tmp/usr/bin/clang -O2 -pipe -march=native
 -fomit-frame-pointer -DATJOB_DIR=\/var/at/jobs/\
 -DLFILE=\/var/at/jobs/.lockfile\ -DLOADAVG_MX=1.5
 -DATSPOOL_DIR=\/var/at/spool\ -DVERSION=\2.9\ -DDAEMON_UID=1
 -DDAEMON_GID=1 -DDEFAULT_BATCH_QUEUE=\'E\' -DDEFAULT_AT_QUEUE=\'c\'
 -DPERM_PATH=\/var/at/\ -I/usr/src/libexec/atrun/../../usr.bin/at
 -I/usr/src/libexec/atrun -DLOGIN_CAP -DPAM -std=gnu99
 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k
 -Wno-uninitialized -Wno-pointer-sign -o atrun atrun.o gloadavg.o -lpam
 -lutil
 
 FAIL (clang: error: linker command failed with exit code 1 (use -v to
 see invocation))

Can you run this in gdb and show me backtrace? Also, what version is your
binutils?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-04 Thread Dimitry Andric

On 2011-05-04 03:07, Manfred Antar wrote:

I get this error when trying to buildworld on current i386.
It's been this way for awhile Any Ideas ?

===  boot/i386/boot0 (all)
clang -O2 -pipe  -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f  -DTICKS=0xb6  -DCOMSPEED=7  
5 + 3 -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 
-mno-sse3 -msoft-float -std=gnu99-c /usr/src/sys/boot/i386/boot0/boot0.S
clang: warning: argument unused during compilation: 
'-mpreferred-stack-boundary=2'
/tmp/cc-4SXZt8.s:42:11: error: .code16 not supported yet


For some reason, on your system, it does not compile boot0.S with
-no-integrated-as.  It works fine here though, so it must be something
local to your system.  Can you please post:

- Your full make.conf and src.conf
- The first 30 lines of sys/boot/i386/boot0/Makefile
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Clang error make buildworld

2011-05-04 Thread Manfred Antar
At 11:38 PM 5/3/2011, Dimitry Andric wrote:
On 2011-05-04 03:07, Manfred Antar wrote:
I get this error when trying to buildworld on current i386.
It's been this way for awhile Any Ideas ?

===  boot/i386/boot0 (all)
clang -O2 -pipe  -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f  -DTICKS=0xb6  
-DCOMSPEED=7  5 + 3 -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx 
-mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99-c 
/usr/src/sys/boot/i386/boot0/boot0.S
clang: warning: argument unused during compilation: 
'-mpreferred-stack-boundary=2'
/tmp/cc-4SXZt8.s:42:11: error: .code16 not supported yet

For some reason, on your system, it does not compile boot0.S with
-no-integrated-as.  It works fine here though, so it must be something
local to your system.  Can you please post:

- Your full make.conf and src.conf
- The first 30 lines of sys/boot/i386/boot0/Makefile

Ok: 
src.conf:

WITHOUT_DYNAMICROOT=yes 
   
WITH_IDEA=yes
.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
#Don't die on warnings
NO_WERROR=
WERROR=

make conf:

# $FreeBSD: src/share/examples/etc/make.conf,v 1.276 2006/03/21 09:49:05 ru Exp 
$
#
# NOTE:  Please would any committer updating this file also update the
# make.conf(5) manual page, if necessary, which is located in
# src/share/man/man5/make.conf.5.
#
# /etc/make.conf, if present, will be read by make (see
# /usr/share/mk/sys.mk).  It allows you to override macro definitions
# to make without changing your source tree, or anything the source
# tree installs.
#
# This file must be in valid Makefile syntax.
#
# There are additional things you can put into /etc/make.conf.
# You have to find those in the Makefiles and documentation of
# the source tree.
#
# Note, that you should not set MAKEOBJDIRPREFIX or MAKEOBJDIR
# from make.conf (or as command line variables to make).
# Both variables are environment variables for make and must be used as:
#
# env MAKEOBJDIRPREFIX=/big/directory make
#
#
# The CPUTYPE variable controls which processor should be targeted for
# generated code.  This controls processor-specific optimizations in
# certain code (currently only OpenSSL) as well as modifying the value
# of CFLAGS to contain the appropriate optimization directive to gcc.
# The automatic setting of CFLAGS may be overridden using the
# NO_CPU_CFLAGS variable below.
# Currently the following CPU types are recognized:
#   Intel x86 architecture:
#   (AMD CPUs)  opteron athlon64 athlon-mp athlon-xp athlon-4
#   athlon-tbird athlon k8 k6-3 k6-2 k6 k5
#   (Intel CPUs)nocona pentium4[m] prescott pentium3[m] pentium-m
#   pentium2 pentiumpro pentium-mmx pentium i486 i386
#   Alpha/AXP architecture: ev67 ev6 pca56 ev56 ev5 ev45 ev4
#   AMD64 architecture: opteron, athlon64, nocona
#   Intel ia64 architecture: itanium2, itanium
#
# (?= allows to buildworld for a different CPUTYPE.)
#
#CPUTYPE?=pentium3
#NO_CPU_CFLAGS= # Don't add -march=cpu to CFLAGS automatically
#NO_CPU_COPTFLAGS=  # Don't add -march=cpu to COPTFLAGS automatically
#
# CFLAGS controls the compiler settings used when compiling C code.
# Note that optimization settings other than -O and -O2 are not recommended
# or supported for compiling the world or the kernel - please revert any
# nonstandard optimization settings to -O or -O2 before submitting bug
# reports without patches to the developers.
#
#CFLAGS= -O -pipe -Wl,--export-dynamic #FOR APACHE#
#CFLAGS= -O -pipe -no-integrated-as
#
# CXXFLAGS controls the compiler settings used when compiling C++ code.
# Note that CXXFLAGS is initially set to the value of CFLAGS.  If you wish
# to add to CXXFLAGS value, += must be used rather than =.  Using =
# alone will remove the often needed contents of CFLAGS from CXXFLAGS.
#
#CXXFLAGS+= -fconserve-space
#
# MAKE_SHELL controls the shell used internally by make(1) to process the
# command scripts in makefiles.  Three shells are supported, sh, ksh, and
# csh.  Using sh is most common, and advised.  Using ksh *may* work, but is
# not guaranteed to.  Using csh is absurd.  The default is to use sh.
#
#MAKE_SHELL?=sh
#
# BDECFLAGS are a set of gcc warning settings that Bruce Evans has suggested
# for use in developing FreeBSD and testing changes.  They can be used by
# putting CFLAGS+=${BDECFLAGS} in /etc/make.conf.  -Wconversion is not
# included here due to compiler bugs, e.g., mkdir()'s mode_t argument.
#
#BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \
#   -Wcast-qual -Wchar-subscripts -Winline \
#   -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
#   -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings
#
# To compile just the kernel with special optimizations, you should use
# this instead of CFLAGS (which is not applicable to kernel builds 

Re: Clang error make buildworld

2011-05-04 Thread Dimitry Andric

On 2011-05-04 15:44, Manfred Antar wrote:
...

src.conf:

WITHOUT_DYNAMICROOT=yes
WITH_IDEA=yes
.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
#Don't die on warnings
NO_WERROR=
WERROR=


Aha.  Please move the clang-related stuff to make.conf instead, e.g.
this fragment:

.if !defined(CC) || ${CC} == cc
CC=clang
.endif
.if !defined(CXX) || ${CXX} == c++
CXX=clang++
.endif
#Don't die on warnings
NO_WERROR=
WERROR=

It will not work properly if you put it in src.conf.  (You can really
only use src.conf for WITH_FOO and WITHOUT_BAR type settings.)
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Clang error make buildworld

2011-05-03 Thread Manfred Antar
I get this error when trying to buildworld on current i386.
It's been this way for awhile Any Ideas ?

=== boot/i386/boot0 (all)
clang -O2 -pipe  -DVOLUME_SERIAL -DPXE -DFLAGS=0x8f  -DTICKS=0xb6  
-DCOMSPEED=7  5 + 3 -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx 
-mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float -std=gnu99-c 
/usr/src/sys/boot/i386/boot0/boot0.S
clang: warning: argument unused during compilation: 
'-mpreferred-stack-boundary=2'
/tmp/cc-4SXZt8.s:42:11: error: .code16 not supported yet
  .code16 # This runs in real mode
  ^
/tmp/cc-4SXZt8.s:313:3: error: unknown use of instruction mnemonic without a 
size suffix
  jmp *%bx # Invoke bootstrap
  ^
/tmp/cc-4SXZt8.s:346:3: error: invalid operand for instruction
  retw # To caller
  ^
/tmp/cc-4SXZt8.s:372:3: error: invalid operand for instruction
  retw # To caller
  ^
*** Error code 1

Stop in /usr/src/sys/boot/i386/boot0.
*** Error code 1

Stop in /usr/src/sys/boot/i386.
*** Error code 1

Stop in /usr/src/sys/boot.
*** Error code 1

Stop in /usr/src/sys.

Thanks
Manfred




||  n...@pozo.com   ||
||  Ph. (415) 681-6235  ||
 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org