Re: Can't update CLang-based system

2011-03-03 Thread Marcelo/Porks
On Mon, Feb 28, 2011 at 09:06, Dimitry Andric  wrote:
> On 2011-02-28 04:30, Tim Kientzle wrote:
>>
>> I have a FreeBSD-CURRENT AMD64 system here that was last updated at
>> r215029.
>>
>> I'm trying to update it to r219079, but the build fails in lib/libz when
>> it tries to compile gvmat64.S.  It looks like the Makefile here has a
>> workaround for clang on AMD64, but it doesn't seem to actually be working in
>> this case.
>
> For this to work, you must put the following fragment in /etc/make.conf,
> *not* in /etc/src.conf.
>
> .if !defined(CC) || ${CC} == "cc"
> CC=clang
> .endif
> .if !defined(CXX) || ${CXX} == "c++"
> CXX=clang++
> .endif
> # Don't die on warnings
> NO_WERROR=
> WERROR=
>
> The problem with src.conf is that is only read when make encounters a
> .include  or  statement, which usually is at
> the end of a Makefile.  Thus, any checks done on ${CC} or ${CXX} in the
> beginning of a Makefile pick up only the default value.

Hi. This worked for me.

Thanks for your help



-- 
Marcelo Rossi
"This e-mail is provided "AS IS" with no warranties, and confers no rights."
"I have nothing against God, I just hate His fan club"
___
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: Can't update CLang-based system

2011-03-01 Thread Dimitry Andric

On 2011-02-28 08:55, Doug Barton wrote:

I have a different problem on r219092. Everything builds find, but
"linking kernel.debug" hangs forever. It can't even be killed with ^C.
My existing system is r218985M, which was built with clang. This is my
first time trying to build a system with clang ON a system that was
itself built with clang (if that makes sense).


In r219139, I've checked in a temporary workaround for this problem.

Long story short, there's a bug in clang's integrated assembler, which
sometimes causes malloc initialization to hang indefinitely in threaded
statically linked executables (such as the bootstrap copy of ctfmerge).

You might need to rebuild and install libc first, to get a good copy of
ctfmerge, though.  This is because the bootstrap copy of ctfmerge is
linked with /usr/lib/libc.a, which might contain a bad version of
malloc.o.
___
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: Can't update CLang-based system

2011-02-28 Thread Alexander Best
On Mon Feb 28 11, Dimitry Andric wrote:
> On 2011-02-28 04:30, Tim Kientzle wrote:
> >I have a FreeBSD-CURRENT AMD64 system here that was last updated at 
> >r215029.
> >
> >I'm trying to update it to r219079, but the build fails in lib/libz when 
> >it tries to compile gvmat64.S.  It looks like the Makefile here has a 
> >workaround for clang on AMD64, but it doesn't seem to actually be working 
> >in this case.
> 
> For this to work, you must put the following fragment in /etc/make.conf,
> *not* in /etc/src.conf.

... or one could use something like this:

diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 1760573..3a817a5 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -355,6 +355,13 @@ __MAKE_CONF?=/etc/make.conf
 .include "${__MAKE_CONF}"
 .endif
 
+.if !defined(_WITHOUT_SRCCONF)
+SRCCONF?=/etc/src.conf
+.if exists(${SRCCONF})
+.include "${SRCCONF}"
+.endif
+.endif
+
 .if defined(__MAKE_SHELL) && !empty(__MAKE_SHELL)
 SHELL= ${__MAKE_SHELL}
 .SHELL: path=${__MAKE_SHELL}

cheers.
alex

> 
> .if !defined(CC) || ${CC} == "cc"
> CC=clang
> .endif
> .if !defined(CXX) || ${CXX} == "c++"
> CXX=clang++
> .endif
> # Don't die on warnings
> NO_WERROR=
> WERROR=
> 
> The problem with src.conf is that is only read when make encounters a
> .include  or  statement, which usually is at
> the end of a Makefile.  Thus, any checks done on ${CC} or ${CXX} in the
> beginning of a Makefile pick up only the default value.

-- 
a13x
___
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: Can't update CLang-based system

2011-02-28 Thread Dimitry Andric

On 2011-02-28 08:55, Doug Barton wrote:

I have a different problem on r219092. Everything builds find, but
"linking kernel.debug" hangs forever. It can't even be killed with ^C.
My existing system is r218985M, which was built with clang. This is my
first time trying to build a system with clang ON a system that was
itself built with clang (if that makes sense).


Do you have WITH_CTF on?  If so, can you try turning it off temporarily,
and see if it builds to completion?
___
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: Can't update CLang-based system

2011-02-28 Thread Dimitry Andric

On 2011-02-28 04:30, Tim Kientzle wrote:

I have a FreeBSD-CURRENT AMD64 system here that was last updated at r215029.

I'm trying to update it to r219079, but the build fails in lib/libz when it 
tries to compile gvmat64.S.  It looks like the Makefile here has a workaround 
for clang on AMD64, but it doesn't seem to actually be working in this case.


For this to work, you must put the following fragment in /etc/make.conf,
*not* in /etc/src.conf.

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

The problem with src.conf is that is only read when make encounters a
.include  or  statement, which usually is at
the end of a Makefile.  Thus, any checks done on ${CC} or ${CXX} in the
beginning of a Makefile pick up only the default value.
___
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: Can't update CLang-based system

2011-02-28 Thread Marcelo/Porks
On Mon, Feb 28, 2011 at 00:30, Tim Kientzle  wrote:
> I have a FreeBSD-CURRENT AMD64 system here that was last updated at r215029.
>
> I'm trying to update it to r219079, but the build fails in lib/libz when it 
> tries to compile gvmat64.S.  It looks like the Makefile here has a workaround 
> for clang on AMD64, but it doesn't seem to actually be working in this case.

Hi all

I'm using AMD64 with clang and I having the same problem. I guess
since 23th february. I tried to 'svn up' yesterday but the problem
remains

/tmp/cc-5pKuc1.s:336:3: error: unknown use of instruction mnemonic
without a size suffix ret 0 ^
*** Error code 1
Stop in /mnt/data/system/src/lib/libz.

-- 
Marcelo Rossi
"This e-mail is provided "AS IS" with no warranties, and confers no rights."
"I have nothing against God, I just hate His fan club"
___
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: Can't update CLang-based system

2011-02-28 Thread Mark Murray
Tim Kientzle writes:
> I have a FreeBSD-CURRENT AMD64 system here that was last updated at =
> r215029.
> 
> I'm trying to update it to r219079, but the build fails in lib/libz when =
> it tries to compile gvmat64.S.  It looks like the Makefile here has a =
> workaround for clang on AMD64, but it doesn't seem to actually be =
> working in this case.

Hi

Exactly the same problem here on r219091:

[graveyard] /usr/src 11:25 am # which clang
/usr/bin/clang
[graveyard] /usr/src 11:25 am # clang -v
FreeBSD clang version 2.9 (trunk 126547) 20110226
Target: x86_64-undermydesk-freebsd9.0
Thread model: posix
[graveyard] /usr/src 11:25 am # cat /etc/src.conf
KERNCONF=   G_AMD64_C
#
BATCH_DELETE_OLD_FILES= yes
#
WITHOUT_LPR=yes
WITHOUT_SENDMAIL=   yes
WITHOUT_CTM=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=

Then "make buildworld" with empty /usr/obj and -DNOCLEAN:

:
:
--
>>> stage 1.2: bootstrap tools
--
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh 
/usr/src/tools/install.sh"  
PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
  WORLDTMP=/usr/obj/usr/src/tmp  VERSION="FreeBSD 9.0-CURRENT amd64 900033"  
MAKEFLAGS="-m /usr/src/tools/build/mk  -D NOCLEAN -m /usr/src/share/mk 
TARGET=amd64 TARGET_ARCH=amd64" make -f Makefile.inc1  DESTDIR=  
BOOTSTRAPPING=900033  SSP_CFLAGS=  -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT 
-DWITHOUT_MAN  -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED  -DNO_CPU_CFLAGS 
-DNO_WARNS -DNO_CTF bootstrap-tools
===> lib/clang/libllvmsupport (obj,depend,all,install)
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmsupport created for 
/usr/src/lib/clang/libllvmsupport
rm -f .depend
CC='clang' mkdep -f .depend -a
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/include 
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include 
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I. 
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include
 -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS 
-D__STDC_CONSTANT_MACROS -DLLVM_HOSTTRIPLE=\"amd64-undermydesk-freebsd9.0\" 
-I/usr/obj/usr/src/tmp/legacy/usr/include 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regcomp.c 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regerror.c 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regexec.c 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regfree.c 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/regstrlcpy.c
CC='clang' mkdep -f .depend -a
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/include 
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/tools/clang/include 
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support -I. 
-I/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/../../lib/clang/include
 -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS 
-D__STDC_CONSTANT_MACROS -DLLVM_HOSTTRIPLE=\"amd64-undermydesk-freebsd9.0\" 
-I/usr/obj/usr/src/tmp/legacy/usr/include
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APFloat.cpp 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APInt.cpp 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/APSInt.cpp 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Allocator.cpp
 /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Atomic.cpp 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/CommandLine.cp
 p 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/ConstantRange.cpp
 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/CrashRecoveryContext.cpp
 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/DAGDeltaAlgorithm.cpp
 /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Debug.cpp 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/DeltaAlgorithm.cpp
 /usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/Dwarf.cpp 
/usr/src/lib/clang/libllvmsupport/../../../contrib/llvm/lib/Support/DynamicLibrary.cpp
 /usr/src/mov edx, [(rsp + 8 - 96)]
^
/tmp/cc-D1h2GI.s:302:3: warning: ignoring directive for now
  .att_syntax
  ^
/tmp/cc-D1h2GI.s:304:3: warning: ignoring directive for now
  .intel_syntax noprefix
  ^
/tmp/cc-D1h2GI.s:309:9: error: unknown use of instruction mnemonic without a 
size suffix
mov r11d,258
^
/tmp/cc-D1h2GI.s:310:9: error: unknown use of instruction mnemonic without a 
size suffix
m

Re: Can't update CLang-based system

2011-02-28 Thread Boris Samorodov
On Sun, 27 Feb 2011 23:55:34 -0800 Doug Barton wrote:
> On 02/27/2011 19:30, Tim Kientzle wrote:

> > I have a FreeBSD-CURRENT AMD64 system here that was last updated at r215029.
> >
> > I'm trying to update it to r219079, but the build fails in lib/libz
> > when it tries to compile gvmat64.S.  It looks like the Makefile here
> > has a workaround for clang on AMD64, but it doesn't seem to actually
> > be working in this case.

> I have a different problem on r219092. Everything builds find, but
> "linking kernel.debug" hangs forever. It can't even be killed with
> ^C.

I had the same problem with kernel.debug hanging (top showed ctfconvert
sitting at umtx state) with a custom kernel. I tried many things (tmpfs,
sound and linux loadable modules were broken as well) and can't say for
sure what helped me but seems that GENERIC kernel was built
successfully.

> My existing system is r218985M, which was built with clang. This
> is my first time trying to build a system with clang ON a system that
> was itself built with clang (if that makes sense).

-- 
WBR, bsam
___
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: Can't update CLang-based system

2011-02-28 Thread datastream datastream.freecity
Me too.
#make buildkernel

clang -shared -nostdlib hack.c -o hack.So
rm -f hack.c
MAKE=make sh /usr/src/sys/conf/newvers.sh G9laptop
/usr/local/bin/svnversion
clang -c -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99  -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes
-Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign
-fformat-extensions -nostdinc  -I. -I/usr/src/sys
-I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include
opt_global.h  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone
 -mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  -msoft-float
-fno-asynchronous-unwind-tables -ffreestanding -fstack-protector   vers.c
clang: warning: argument unused during compilation: '-frename-registers'
clang: warning: argument unused during compilation: '-mfpmath=387'
linking kernel


load: 0.01  cmd: ctfmerge 33795 [umtxn] 1241.95r 0.00u 0.03s 0% 428k
load: 0.20  cmd: ctfmerge 33795 [umtxn] 1646.21r 0.00u 0.03s 0% 428k
load: 0.18  cmd: ctfmerge 33795 [umtxn] 1650.68r 0.00u 0.03s 0% 428k
load: 0.14  cmd: ctfmerge 33795 [umtxn] 2697.40r 0.00u 0.03s 0% 428k
load: 0.12  cmd: ctfmerge 33795 [umtxn] 3371.61r 0.00u 0.03s 0% 428k
load: 0.13  cmd: ctfmerge 33795 [umtxn] 3651.02r 0.00u 0.03s 0% 428k
load: 0.51  cmd: ctfmerge 33795 [umtxn] 5262.95r 0.00u 0.03s 0% 428k

On Mon, Feb 28, 2011 at 3:55 PM, Doug Barton  wrote:

> On 02/27/2011 19:30, Tim Kientzle wrote:
>
>> I have a FreeBSD-CURRENT AMD64 system here that was last updated at
>> r215029.
>>
>> I'm trying to update it to r219079, but the build fails in lib/libz when
>> it tries to compile gvmat64.S.  It looks like the Makefile here has a
>> workaround for clang on AMD64, but it doesn't seem to actually be working in
>> this case.
>>
>
> I have a different problem on r219092. Everything builds find, but "linking
> kernel.debug" hangs forever. It can't even be killed with ^C. My existing
> system is r218985M, which was built with clang. This is my first time trying
> to build a system with clang ON a system that was itself built with clang
> (if that makes sense).
>
>
> Doug
>
> --
>
>Nothin' ever doesn't change, but nothin' changes much.
>-- OK Go
>
>Breadth of IT experience, and depth of knowledge in the DNS.
>Yours for the right price.  :)  http://SupersetSolutions.com/
>
>
> ___
> 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"
>
___
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: Can't update CLang-based system

2011-02-27 Thread Doug Barton

On 02/27/2011 19:30, Tim Kientzle wrote:

I have a FreeBSD-CURRENT AMD64 system here that was last updated at r215029.

I'm trying to update it to r219079, but the build fails in lib/libz when it 
tries to compile gvmat64.S.  It looks like the Makefile here has a workaround 
for clang on AMD64, but it doesn't seem to actually be working in this case.


I have a different problem on r219092. Everything builds find, but 
"linking kernel.debug" hangs forever. It can't even be killed with ^C. 
My existing system is r218985M, which was built with clang. This is my 
first time trying to build a system with clang ON a system that was 
itself built with clang (if that makes sense).



Doug

--

Nothin' ever doesn't change, but nothin' changes much.
-- OK Go

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

___
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"


Can't update CLang-based system

2011-02-27 Thread Tim Kientzle
I have a FreeBSD-CURRENT AMD64 system here that was last updated at r215029.

I'm trying to update it to r219079, but the build fails in lib/libz when it 
tries to compile gvmat64.S.  It looks like the Makefile here has a workaround 
for clang on AMD64, but it doesn't seem to actually be working in this case.


___
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"