Projects
home:Eustace:branches:Eulaceura:Factory
f2c
_service:obs_scm:0002-libf2c-support-build-shar...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0002-libf2c-support-build-shared-object.patch of Package f2c
From bbd87bb99313d8fc6463a4eeec21c1591f33388a Mon Sep 17 00:00:00 2001 From: rpm-build <rpm-build> Date: Thu, 18 Jan 2024 03:30:27 +0000 Subject: [PATCH] f2c support build shared object Signed-off-by: rpm-build <rpm-build> --- libf2c/makefile.u | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/libf2c/makefile.u b/libf2c/makefile.u index efe7dc0..627eb83 100644 --- a/libf2c/makefile.u +++ b/libf2c/makefile.u @@ -15,13 +15,15 @@ .SUFFIXES: .c .o CC = cc SHELL = /bin/sh -CFLAGS = -O +CFLAGS += -fPIC +SHARED = libf2c.so.@SOVER@ # compile, then strip unnecessary symbols .c.o: $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c - ld -r -x -o $*.xxx $*.o - mv $*.xxx $*.o +%.o : %.c + $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< + ## Under Solaris (and other systems that do not understand ld -x), ## omit -x in the ld line above. ## If your system does not have the ld command, comment out @@ -69,11 +71,11 @@ TIME = dtime_.o etime_.o OFILES = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME) -all: f2c.h signal1.h sysdep1.h libf2c.a +all: f2c.h signal1.h sysdep1.h libf2c.a $(SHARED) libf2c.a: $(OFILES) - ar r libf2c.a $? - -ranlib libf2c.a + ar r $@ $? + -ranlib $@ ## Shared-library variant: the following rule works on Linux ## systems. Details are system-dependent. Under Linux, -fPIC @@ -85,8 +87,8 @@ libf2c.a: $(OFILES) ## instead of "$(CC) -shared", and when running programs linked against libf2c.so, ## arrange for $DYLD_LIBRARY_PATH to include the directory containing libf2c.so. -libf2c.so: $(OFILES) - $(CC) -shared -o libf2c.so $(OFILES) +$(SHARED): $(OFILES) + $(CC) -shared -Wl,-soname,libf2c.so.0 -o $@ $(OFILES) -lm -lc ### If your system lacks ranlib, you don't need it; see README. @@ -126,7 +128,7 @@ install: libf2c.a -ranlib $(LIBDIR)/libf2c.a clean: - rm -f libf2c.a *.o arith.h signal1.h sysdep1.h + rm -f libf2c.a *.o arith.h signal1.h sysdep1.h $(SHARED) backspac.o: fio.h close.o: fio.h -- 2.43.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2