Subject: port-i386/2433: Allow build of i387 libm with an environment variable
To: None <gnats-bugs@NetBSD.ORG>
From: Matthieu Herrb <Mathieu.Herrb@mipnet.fr>
List: netbsd-bugs
Date: 05/18/1996 16:21:32
>Number:         2433
>Category:       port-i386
>Synopsis:       Allow build of i387 libm with an environment variable
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat May 18 10:35:04 1996
>Last-Modified:
>Originator:     Matthieu Herrb
>Organization:
	
>Release:        NetBSD-current 960517
>Environment:
System: NetBSD cougar 1.1B NetBSD 1.1B (COUGAR) #5: Wed Apr 17 21:12:16 MET DST 1996 matthieu@cougar:/usr/src/sys/arch/i386/compile/COUGAR i386


>Description:
	One has to edit libm's Makefile to build a libm that uses the 
	387 (or the built-in coprocessor for 486s and pentiums). I
	often forget to modify it after sup has overwritten the
	Makefile.

>How-To-Repeat:
	Exercice for the reader...
>Fix:
	Here's a possible change to the Makefile in lib/libm:
	(If someone has another idea for the variable name, I don't mind)

*** lib/libm/Makefile~	Mon Dec 11 21:25:56 1995
--- lib/libm/Makefile	Sat May 18 16:09:06 1996
***************
*** 43,57 ****
  # 
  
  .if (${MACHINE_ARCH} == "i386")
! # Uncomment the following lines if you have a i387 (or i486 or Pentium)
! #.PATH:	${.CURDIR}/arch/i387
! #ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \
! #	    e_remainder.S e_remainderf.S e_scalb.S e_sqrt.S e_sqrtf.S \
! #	    s_atan.S s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \
! #	    s_cos.S s_cosf.S s_finite.S s_finitef.S s_floor.S s_floorf.S \
! #	    s_ilogb.S s_ilogbf.S s_log1p.S s_log1pf.S s_logb.S s_logbf.S \
! #	    s_rint.S s_rintf.S s_scalbn.S s_scalbnf.S s_significand.S \
! #	    s_significandf.S s_sin.S s_sinf.S s_tan.S s_tanf.S
  .elif (${MACHINE_ARCH} == "m68k")
  .PATH:	${.CURDIR}/arch/mc68881
  ARCH_SRCS = e_acos.S e_asin.S e_atanh.S e_cosh.S e_exp.S e_log.S e_log10.S \
--- 43,58 ----
  # 
  
  .if (${MACHINE_ARCH} == "i386")
! .if defined(I387)
! .PATH:	${.CURDIR}/arch/i387
! ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_fmod.S e_log.S e_log10.S \
! 	    e_remainder.S e_remainderf.S e_scalb.S e_sqrt.S e_sqrtf.S \
! 	    s_atan.S s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \
! 	    s_cos.S s_cosf.S s_finite.S s_finitef.S s_floor.S s_floorf.S \
! 	    s_ilogb.S s_ilogbf.S s_log1p.S s_log1pf.S s_logb.S s_logbf.S \
! 	    s_rint.S s_rintf.S 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
  ARCH_SRCS = e_acos.S e_asin.S e_atanh.S e_cosh.S e_exp.S e_log.S e_log10.S \

>Audit-Trail:
>Unformatted: