Subject: port-i386/3510: libm build on i386 w/i387 should be easier
To: None <>
From: Havard Eidnes <>
List: netbsd-bugs
Date: 04/18/1997 13:35:07
>Number:         3510
>Category:       port-i386
>Synopsis:       libm build on i386 w/i387 should be easier
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 04:50:05 1997
>Originator:     Havard Eidnes
>Release:        NetBSD-current April 14 1997
	Pentium, NetBSD-current, i386, libm
System: NetBSD 1.2D NetBSD 1.2D (VADER) #0: Mon Apr 14 23:27:38 MEST 1997 i386

	One should not have to edit the /usr/src/lib/libm/Makefile
	to get an architecture-optimized version of the math libraries.

	Note also that through use of a "simple SUP update", the edit
	you do in one round to fix this will be lost on the next SUP.
	(Not everyone's prepared to set up their own CVS repository.)

	Observe that the i387 section is commented out in the distributed
	Makefile and has to be manually edited to enable the i387 code.

	The attached fix to libm/Makefile makes it possible to tell
	make via /etc/mk.conf that you have a math coprocessor on your
	system.  /etc/mk.conf might look like this:

% cat /etc/mk.conf
# System specific build options

HAS_i387=       1

*** Makefile.orig	Fri Apr 18 11:35:15 1997
--- Makefile	Fri Apr 18 13:25:28 1997
*** 51,54 ****
--- 51,55 ----
  .elif (${MACHINE_ARCH} == "i386")
  # Uncomment the following lines if you have a i387 (or i486 or Pentium)
+ .if defined(HAS_i387)
  .PATH:	${.CURDIR}/arch/i387
  ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
*** 60,63 ****
--- 61,65 ----
  	    s_scalbn.S s_scalbnf.S s_significand.S s_significandf.S s_sin.S \
  	    s_sinf.S s_tan.S s_tanf.S
+ .endif
  .elif (${MACHINE_ARCH} == "m68k")
  .PATH:	${.CURDIR}/arch/mc68881