From owner-freebsd-current@FreeBSD.ORG Fri Sep 9 03:45:21 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A169F106564A for ; Fri, 9 Sep 2011 03:45:21 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2DA7F8FC13 for ; Fri, 9 Sep 2011 03:45:21 +0000 (UTC) Received: by fxe4 with SMTP id 4so2900298fxe.13 for ; Thu, 08 Sep 2011 20:45:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=dDJx7EvOj67YQdMtQVuicMbP9gk17FU1zwiBOd35Lq0=; b=UvkexxekQ60FqylxZUmmdzmmdzcrXi61OVJLW+NMj2v9gyrrconI4ecEZsT5Pt6WlL bg34glEAbV/RiqTgbzFoLMT+FCNXxh+WZiKkgpWbeCdfK+WXJ0J5ANP3vHksVA3ERjn4 Crw0fL4tG7jypE5mqYXdUnjUuiwLAjeoJYed4= Received: by 10.223.58.13 with SMTP id e13mr494575fah.41.1315539920331; Thu, 08 Sep 2011 20:45:20 -0700 (PDT) Received: from limbo.lan ([195.225.157.86]) by mx.google.com with ESMTPS id c12sm2282795fad.14.2011.09.08.20.45.18 (version=SSLv3 cipher=OTHER); Thu, 08 Sep 2011 20:45:18 -0700 (PDT) Message-ID: <4E698BCC.5010400@gmail.com> Date: Fri, 09 Sep 2011 06:45:16 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:6.0.2) Gecko/20110907 Thunderbird/6.0.2 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4E62915E.1010405@FreeBSD.org> <4E6294E0.5010104@gmail.com> <4E6298DE.5090007@FreeBSD.org> <4E644993.4090703@gmail.com> <4E660BA3.8080103@FreeBSD.org> <4E66162F.8090406@gmail.com> <4E661B1C.2030608@gmail.com> <4E662C7A.3020404@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Compiling BETA2 with clang fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 03:45:21 -0000 06.09.2011 17:44, Olivier Smedts wrote: >> You mean like fully rebuilding system with gcc and -march=athlon-xp and then >> try again? > > Like cleaning /usr/obj/ and then buildworld with clang but with > "-march=athlon-xp" instead of "-march=native". > As the problem does not seem to be in your current world but rather in > the bootstrap clang compiled with -march=native, you should not have > to {build,install}world with gcc first. I cleaned /usr/obj and made a build with -march=athlon-xp. Same errors. I've also tried to investigate further. This happens when clang runs linker to link a binary. It runs something like: "/usr/obj/usr/src/tmp/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 -m elf_i386_fbsd -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 Showstopper here is -L. If I add -L/usr/lib to this command it completes successfully. # nm -D /usr/obj/usr/src/tmp/usr/lib/libc.so 00000000 A FBSD_1.0 00000000 A FBSD_1.1 00000000 A FBSD_1.2 00000000 A FBSDprivate_1.0 w _Jv_RegisterClasses U __progname w __pthread_cxa_finalize 00030624 T __semctl 0000dbe0 T __stack_chk_fail_local 00012880 T acl_add_perm 000128b0 T acl_delete_perm 00012850 T acl_get_perm_np U environ 00029610 T fts_children 000286b0 T fts_close 00029770 T fts_get_clientptr 00029780 T fts_get_stream 00027f70 T fts_open 000287e0 T fts_read 000295d0 T fts_set 00029790 T fts_set_clientptr 000305c4 T msgctl 0001e910 T sem_close 0001e6a0 T sem_destroy 0001edb0 T sem_getvalue 0001e5c0 T sem_init 0001e730 T sem_open 0001ed20 T sem_post 0001ea00 T sem_timedwait 0001ec90 T sem_trywait 0001e9e0 T sem_unlink 0001ec60 T sem_wait 00021a30 T semctl 00030524 T shmctl 0001fff0 T ttyslot That's the problem - libraries miss most symbols. That's all for now, I'll be back at this one tomorrow. -- Sphinx of black quartz judge my vow.