From owner-freebsd-amd64@FreeBSD.ORG Thu Mar 24 20:47:41 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 802DE16A4CE; Thu, 24 Mar 2005 20:47:41 +0000 (GMT) Received: from hadar.amcc.com (hadar.amcc.com [192.195.69.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id E929043D1F; Thu, 24 Mar 2005 20:47:38 +0000 (GMT) (envelope-from vkashyap@amcc.com) Received: from mailhost01.amcc.com ([192.195.69.30]) by hadar.amcc.com (Netscape Messaging Server 4.15) with SMTP id IDVJ3H01.CW0; Thu, 24 Mar 2005 12:47:41 -0800 Received: (from vkashyap-pc [10.66.6.61]) by mailhost01.amcc.com (SMSSMTP 4.0.0.59) with SMTP id M2005032412510115974 ; Thu, 24 Mar 2005 12:51:01 -0800 From: "Vinod Kashyap" To: obrien@freebsd.org Date: Thu, 24 Mar 2005 12:46:41 -0800 X-Sent-Folder-Path: Sent Items X-Mailer: Oracle Connector for Outlook 9.0.4 51114 (9.0.6627) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-ID: cc: freebsd-amd64@freebsd.org Subject: RE: undefined reference to `memset' X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2005 20:47:41 -0000 Ok, make sure you have 'device twa' in your kernel configuration file, and apply these patches to /sys/dev/twa/twa.c. This patch causes the problem: --- twa.c.org Wed Mar 23 11:13:49 2005 +++ twa.c Thu Mar 24 12:42:23 2005 @@ -366,9 +366,12 @@ int8_t fw_flashed =3D FALSE; int8_t fw_flash_failed =3D FALSE; #endif /* TWA_FLASH_FIRMWARE */ + int8_t tw_expt[100] =3D {0}; + int8_t *tw_expt_ptr; = twa_dbg_dprint_enter(3, sc); = + tw_expt_ptr =3D &(tw_expt[0]); /* Wait for the controller to become ready. */ if (twa_wait_status(sc, TWA_STATUS_MICROCONTROLLER_READY, TWA_REQUEST_TIMEOUT_PERIOD)) { This patch does not cause the problem: --- twa.c.org Wed Mar 23 11:13:49 2005 +++ twa.c Thu Mar 24 12:36:10 2005 @@ -366,9 +366,13 @@ int8_t fw_flashed =3D FALSE; int8_t fw_flash_failed =3D FALSE; #endif /* TWA_FLASH_FIRMWARE */ + int8_t tw_expt[100]/* =3D {0}*/; + int8_t *tw_expt_ptr; = twa_dbg_dprint_enter(3, sc); = + memset(tw_expt, 0, 100); + tw_expt_ptr =3D &(tw_expt[0]); /* Wait for the controller to become ready. */ if (twa_wait_status(sc, TWA_STATUS_MICROCONTROLLER_READY, TWA_REQUEST_TIMEOUT_PERIOD)) { > -----Original Message----- > From: David O'Brien [mailto:obrien@FreeBSD.ORG] > Sent: Thursday, March 24, 2005 12:21 PM > To: Vinod Kashyap > Cc: freebsd-amd64@freebsd.org > Subject: Re: undefined reference to `memset' > = > = > On Thu, Mar 24, 2005 at 06:05:17PM +1100, Peter Jeremy wrote: > > On Wed, 2005-Mar-23 13:48:04 -0800, Vinod Kashyap wrote: > > >If any kernel module has the following, or a similar line in it: > > >----- > > >char x[100] =3D {0}; > > >----- > > >building of the GENERIC kernel on FreeBSD 5 -STABLE for amd64 > > >as of 03/19/05, fails with the following message at the = > time of linking: > > >"undefined reference to `memset'". > > > > > >The same problem is not seen on i386. > > > > > >The problem goes away if the above line is changed to: > > >----- > > >char x[100]; > > >memset(x, 0, 100); > > >----- > > = > > Can you post a complete (compilable) example please. > = > Vinod can you please post a complete compilable example? > It is impossible to get anything done about your issue without stand > alone test code. > = > -- = > -- David (obrien@FreeBSD.org) >