Subject: admin/17968: pwlib always compiled with -m486
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Wojciech@netbsd.org, Puchar@netbsd.org>
List: netbsd-bugs
Date: 08/17/2002 09:04:24
>Number: 17968
>Category: admin
>Synopsis: pwlib always compiled with -m486
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: netbsd-admin
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 17 09:05:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: wojtek@tensor.3miasto.net
>Release: 1.5.3
>Organization:
TENSOR ap
>Environment:
NetBSD chylonia.3miasto.net 1.5.3 NetBSD 1.5.3 (local) #9: Thu Aug 15 15:25:42 CEST 2002 wojtek@chylonia.3miasto.net:/home/wojtek/kernel/local i386
>Description:
pwlib Makefiles are made so -m486 is automatically appended for x86 platform
that's bad as default optimization should be used.
for example i have pentium-defaulting gcc, someone else may use make CC="cc -march=i686"
etc.
>How-To-Repeat:
>Fix:
replace patch-aa with this and make makepatchsum
--- make/unix.mak.old Sat Aug 17 17:56:16 2002
+++ make/unix.mak Sat Aug 17 17:57:23 2002
@@ -490,21 +490,14 @@
P_PTHREADS := 1
-ifeq ($(MACHTYPE),x86)
-STDCCFLAGS += -m486
-endif
+#ifeq ($(MACHTYPE),x86)
+#STDCCFLAGS += -m486
+#endif
STDCCFLAGS += -DP_NETBSD
LDLIBS += -lossaudio
-ifdef P_PTHREADS
-STDCCFLAGS += -I/usr/pkg/pthreads/include
-LDFLAGS += -L/usr/pkg/pthreads/lib
-LDLIBS += -lpthread
-CC := /usr/pkg/pthreads/bin/pgcc
-CPLUS := /usr/pkg/pthreads/bin/pg++
-endif
-
+P_SHAREDLIB := 1
P_USE_RANLIB := 1
endif # NetBSD
@@ -708,13 +701,14 @@
ifeq ($(P_SHAREDLIB),0)
LIB_SUFFIX = a
else
-LIB_SUFFIX = so
+LIB_SUFFIX = la
endif
ifndef LIB_TYPE
LIB_TYPE =
endif
+INSTALL_DIR = ${PREFIX}
ifndef INSTALL_DIR
INSTALL_DIR = /usr/local
endif
@@ -785,7 +779,7 @@
PW_LIBDIR = $(PWLIBDIR)/lib
# set name of the PT library
-PTLIB_BASE = pt_$(PLATFORM_TYPE)_$(OBJ_SUFFIX)
+PTLIB_BASE = pt
PTLIB_FILE = lib$(PTLIB_BASE)$(LIB_TYPE).$(LIB_SUFFIX)
PT_OBJBASE = obj_$(PLATFORM_TYPE)_$(OBJ_SUFFIX)
PT_OBJDIR = $(PW_LIBDIR)/$(PT_OBJBASE)
@@ -851,6 +845,6 @@
# add library directory to library path and include the library
LDFLAGS += -L$(PW_LIBDIR)
-LDLIBS += -l$(PTLIB_BASE)$(LIB_TYPE)
+LDLIBS += $(PW_LIBDIR)/$(PTLIB_FILE)
# End of unix.mak
>Release-Note:
>Audit-Trail:
>Unformatted: