Skip to content

Commit 1740a79

Browse files
committed
ode4linux: make it buildable
- build.sh that follows the ode.spec from SRPM - builds with gcc 4.8 (and a boatload of warnings) Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
1 parent 6ad6db5 commit 1740a79

10 files changed

Lines changed: 66 additions & 14 deletions

File tree

build.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
arch=`uname -m`
4+
case "$arch" in
5+
i?86) context=at386_linux ;;
6+
x86_64) context=at386_linux ;;
7+
ppc) context=ppc_linux ;;
8+
esac
9+
10+
cat > sandboxrc <<EOF
11+
default ode4linux
12+
base * ${PWD}/..
13+
sb ode4linux
14+
EOF
15+
cat > rc_files/ode/sb.conf <<EOF
16+
replace ode_sc true
17+
replace ode_build_env true
18+
EOF
19+
20+
cd src
21+
export context=${context}
22+
export OS=linux
23+
sh +x ode/setup/setup.sh ${context}
24+
25+
#
26+
# Now we can actually begin to build ODE
27+
# There seems to be something missing in the bootstrap
28+
# sequence. It is necessary to link directly to the
29+
# LINUXARCH/arch_fmtdeps.c file. We aren't finding it
30+
# on our own the way we would if the full ODE build
31+
# environment were available.
32+
#
33+
cd ..
34+
mkdir -p logs/${context}
35+
rm -f src/ode/bin/make/arch_fmtdep.c
36+
ln -s ${PWD}/src/ode/bin/make/LINUXARCH/arch_fmtdep.c src/ode/bin/make/arch_fmtdep.c
37+
export PATH="${PWD}/tools/${context}/bin:$PATH"
38+
export context=${context}
39+
export OS=linux
40+
echo $PATH
41+
workon -sb ode4linux -rc `pwd`/sandboxrc <<EOF
42+
set -x
43+
build -here MAKEFILE_PASS=FIRST && \
44+
build -here MAKEFILE_PASS=SECOND CC_OPT_LEVEL=-O2 && \
45+
build MAKEFILE_PASS=BASIC ode/lib/oxm_relay_tcp CC_OPT_LEVEL=-O2 && \
46+
build -here MAKEFILE_PASS=BASIC CC_OPT_LEVEL=-O2 ode/bin ode/server && \
47+
build -here MAKEFILE_PASS=BASIC ode/man ode/doc
48+
EOF

rc_files/ode/sb.conf

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
replace backing_project ode
2-
replace backing_build /afs/ri/project/ode/build/ode_234_ri_public
3-
replace ode_sc true
4-
replace ode_build_env true
1+
replace ode_sc true
2+
replace ode_build_env true

src/Makeconf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,11 @@ TARGET_MACHINE=AT386
339339
target_machine=at386
340340
TARGET_CPU=I386
341341
target_cpu=i386
342+
PORTING_OFILES=va_argv.o
343+
SUP_TARGET_LIBS=-lcrypt
344+
EROFF=groff
345+
_EROFFFLAGS_=
346+
CFLAGS+= -Wall -Wstrict-prototypes -Wpointer-arith
342347
CENV= -DNO_STATVFS -DINC_VFS -DUSE_BSIZE -DVA_ARGV_IS_RECAST -DNO_POLL
343348

344349
.elif (${context} == "ppc_linux")
@@ -350,6 +355,7 @@ target_cpu=ppc
350355
PORTING_OFILES=va_argv.o
351356
SUP_TARGET_LIBS=-lcrypt
352357
EROFF=groff
358+
_EROFFFLAGS_=
353359
CFLAGS+= -Wall -Wstrict-prototypes -Wpointer-arith
354360
CENV= -DNO_STATVFS -DINC_VFS -DUSE_BSIZE -DNO_POLL
355361

src/ode/Buildconf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,5 +100,5 @@ replace setenv BACKED_SOURCEDIR ${source_base}
100100
replace setenv SOURCEDIR ""
101101
replace setenv INCDIRS "-I${export_base}/usr/include"
102102
replace setenv LIBDIRS "-L${export_base}/usr/lib"
103-
setenv USE_DASH_I_DASH 1
103+
setenv USE_DASH_I_DASH 0
104104
setenv IDL_GEN_AUX_FILES 1

src/ode/bin/build/build.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static const char * rcsid =
162162
#include <sys/time.h>
163163
#include <sys/wait.h>
164164
#include <errno.h>
165-
#include <varargs.h>
165+
#include <stdarg.h>
166166
#include <a.out.h>
167167
#include <pwd.h>
168168
#include <grp.h>

src/ode/bin/release/release_db.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static char rcsid[] = "@(#)$RCSfile: release_db.c,v $ $Revision: 1.8.2.4 $ (OSF)
9999
#include <sys/errno.h>
100100
extern int errno;
101101
#include <stdio.h>
102-
#include <varargs.h>
102+
#include <stdarg.h>
103103
#ifndef USE_REFERENCE_COUNTING
104104
#define USE_REFERENCE_COUNTING 1
105105
#endif /* USE_REFERENCE_COUNTING */

src/ode/doc/sag/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ odexm.map_IDIR = /server/
7878
IDIR = /doc/
7979

8080
EROFF ?= eroff
81-
_EROFFFLAGS_ = -mm
81+
_EROFFFLAGS_ ?= -mm
8282
PIC = pic
8383
TBL = tbl
8484

src/ode/doc/users.gd/common/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ VPATH = ../../../man/man1:../../../man/man5
8282
ILIST = UsersGuide.ps UsersGuide.appendixA.ps
8383
IDIR = /doc/
8484
EROFF ?= eroff
85-
_EROFFFLAGS_ = -mm
85+
_EROFFFLAGS_ ?= -mm
8686
PIC = pic
8787
TBL = tbl
8888

src/ode/lib/libode/history.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ int buf_lines;
12501250
*/
12511251
STATIC
12521252
char *
1253-
getline( char *buf, int bufsiz, FILE *fp, int sameline, ERR_LOG *log )
1253+
getlin( char *buf, int bufsiz, FILE *fp, int sameline, ERR_LOG *log )
12541254
{
12551255
if (!sameline) {
12561256
if (fgets(buf, bufsiz, fp) == NULL) {
@@ -1302,7 +1302,7 @@ int search_for(
13021302
/*
13031303
* Good leader required
13041304
*/
1305-
while ((res = getline(buf, size, inf, reuse, log)) != NULL) {
1305+
while ((res = getlin(buf, size, inf, reuse, log)) != NULL) {
13061306
reuse = FALSE;
13071307
*good_leader = (strncmp(buf, leader, lead_len) == 0);
13081308
if (*good_leader) {
@@ -1321,7 +1321,7 @@ int search_for(
13211321
* Good leader not required
13221322
*/
13231323
case 2:
1324-
while ((res = getline(buf, size, inf, reuse, log)) != NULL) {
1324+
while ((res = getlin(buf, size, inf, reuse, log)) != NULL) {
13251325
reuse = FALSE;
13261326
if ((*ptr = strstr(buf, search)) != NULL) {
13271327
*good_leader = (strncmp(buf, leader, lead_len) == 0);
@@ -1334,7 +1334,7 @@ int search_for(
13341334
* Look on immediate line only
13351335
*/
13361336
case 3:
1337-
if ((res = getline(buf, size, inf, reuse, log)) != NULL) {
1337+
if ((res = getlin(buf, size, inf, reuse, log)) != NULL) {
13381338
reuse = FALSE;
13391339
*good_leader = (strncmp(buf, leader, lead_len) == 0);
13401340
if ((*ptr = strstr(buf, search)) != NULL) {

src/ode/lib/libode/porting/va_argv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#include <ode/odedefs.h>
5454
#include <string.h>
5555
#include <unistd.h>
56-
#include <varargs.h>
56+
#include <stdarg.h>
5757

5858
char ** va_argv ( ap )
5959
va_list ap;

0 commit comments

Comments
 (0)