Browse code

- openbsd 3.4 (switched from aout to elf) support/auto-detection - version number increased to 0.8.13-dev-something

Andrei Pelinescu-Onciul authored on 26/11/2003 11:43:39
Showing 1 changed files
... ...
@@ -30,6 +30,7 @@
30 30
 #              and other FreeBSD arches for which no fast locking assembly
31 31
 #              code exists (sobomax)
32 32
 #  2003-11-08  mips1 support introduced (andrei)
33
+#  2003-11-24  openbsd 3.4 (elf) fixes (andrei)
33 34
 
34 35
 
35 36
 # check if already included/exported
... ...
@@ -43,13 +44,14 @@ export makefile_defs
43 44
 #version number
44 45
 VERSION = 0
45 46
 PATCHLEVEL = 8
46
-SUBLEVEL =   12
47
+SUBLEVEL =   13
47 48
 EXTRAVERSION = -dev-23-merged
48 49
 
49 50
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
50 51
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
51 52
 ARCH = $(shell uname -m |sed -e s/i.86/i386/ -e s/sun4u/sparc64/  \
52 53
 			-e s/armv4l/arm/)
54
+OSREL = $(shell uname -r)
53 55
 
54 56
 # TLS support
55 57
 TLS ?= 
... ...
@@ -701,7 +703,7 @@ ifeq ($(OS), freebsd)
701 703
 endif
702 704
 
703 705
 ifeq ($(OS), openbsd)
704
-	DEFS+=-DHAVE_SOCKADDR_SA_LEN -DDLSYM_PREFIX='"_"' -DHAVE_GETHOSTBYNAME2 \
706
+	DEFS+=-DHAVE_SOCKADDR_SA_LEN  -DHAVE_GETHOSTBYNAME2 \
705 707
 		-DHAVE_UNION_SEMUN -DHAVE_MSGHDR_MSG_CONTROL
706 708
 	ifneq ($(found_lock_method), yes)
707 709
 		DEFS+= -DUSE_PTHREAD_MUTEX  # try pthread sems
... ...
@@ -711,8 +713,14 @@ ifeq ($(OS), openbsd)
711 713
 	YACC=yacc
712 714
 	# no sched_yield on openbsd unless linking with c_r (not recommended)
713 715
 	LIBS= -lfl 
714
-	LDFLAGS=        # openbsd ld doesn't like -O2 or -E
716
+	OPENBSD_IS_AOUT= $(shell echo "$(OSREL)" | \
717
+				sed -e 's/^3\.[0-3][^0-9]*$$/yes/' |sed -e 's/^[0-2]\..*/yes/')
718
+	
719
+ifeq ($(OPENBSD_IS_AOUT), yes)
720
+		DEFS+=-DDLSYM_PREFIX='"_"'
721
+		LDFLAGS=        # openbsd ld doesn't like -O2 or -E
715 722
 endif
723
+endif   # if opensd
716 724
 	
717 725
 ifeq ($(OS), netbsd)
718 726
 	DEFS+=-DHAVE_SOCKADDR_SA_LEN -DHAVE_GETHOSTBYNAME2 \