From owner-freebsd-bugs@FreeBSD.ORG Sat Oct 14 18:30:21 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E34B316A47C for ; Sat, 14 Oct 2006 18:30:21 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E3A643D58 for ; Sat, 14 Oct 2006 18:30:21 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9EIULb2097286 for ; Sat, 14 Oct 2006 18:30:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9EIULCi097285; Sat, 14 Oct 2006 18:30:21 GMT (envelope-from gnats) Resent-Date: Sat, 14 Oct 2006 18:30:21 GMT Resent-Message-Id: <200610141830.k9EIULCi097285@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Wes Peters Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D20616A403 for ; Sat, 14 Oct 2006 18:28:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F04E43D8D for ; Sat, 14 Oct 2006 18:27:59 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k9EIRw9Q021789 for ; Sat, 14 Oct 2006 18:27:58 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k9EIRwde021787; Sat, 14 Oct 2006 18:27:58 GMT (envelope-from nobody) Message-Id: <200610141827.k9EIRwde021787@www.freebsd.org> Date: Sat, 14 Oct 2006 18:27:58 GMT From: Wes Peters To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: bin/104425: c++ vs. fesetenv: undefined reference to __test_sse() X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Oct 2006 18:30:22 -0000 >Number: 104425 >Category: bin >Synopsis: c++ vs. fesetenv: undefined reference to __test_sse() >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 14 18:30:19 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Wes Peters >Release: 6.2-PRERELEASE >Organization: FreeBSD >Environment: FreeBSD zaphod.softweyr.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #4: Thu Oct 12 08:51:53 PDT 2006 rootb@zaphod.softweyr.com:/usr/obj/usr/src/sys/ZAPHOD i386 >Description: wes@zaphod$ cat hello.cc #include #include using namespace std; int main(int argc, char *argv[]) { fenv_t envp; int i = fegetenv(&envp); fesetenv(&envp); cout << "Hello, world" << endl; } wes@zaphod$ c++ -g hello.cc -lm /var/tmp//ccgJGfUg.o(.text+0x1b6): In function `fesetenv': /usr/include/fenv.h:211: undefined reference to `__test_sse()' The problem seems to lie in the C++ runtime startup, the nearly identical C program has no problems: wes@zaphod$ cat hello.c #include #include #pragma STDC FENV_ACCESS ON int main(int argc, char *argv[]) { fenv_t envp; int i = fegetenv(&envp); fesetenv(&envp); printf("Hello, world\n"); } wes@zaphod$ cc -g hello.c -lm wes@zaphod$ ./a.out Hello, world >How-To-Repeat: Attempt to compile any C++ program that calls fesetenv. >Fix: Still working on it. This may be a show-stopper for release, if we care about C++ and floating-point support. >Release-Note: >Audit-Trail: >Unformatted: