Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e89d450

Browse files
committed
Chris Herborth writes:
Here's a little cleanup of the BeOS/ directory for 1.5.2b2; it makes the ar-fake, linkcc and linkmodule shell scripts a little smarter (and, in the case of PowerPC systems, quieter :-).
1 parent cad3d47 commit e89d450

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

BeOS/ar-fake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ is_abs() {
4848
# PowerPC or x86 systems running BeOS.
4949
build_lib() {
5050
LIB=$1 ; shift
51+
SO_LIB=${LIB/.a/.so}
5152
SO_NAME=$1 ; shift
5253
CRUD_NAME=$1 ; shift
5354

@@ -79,7 +80,7 @@ build_lib() {
7980
PARTS="$PARTS ${OBJ_PATH}${OBJ_FILE}"
8081
done < $CRUD_NAME
8182

82-
$AR_CC -o ${LIB%.a}.so $PARTS $AR_GLUE $EXTRA_LIBS > /dev/null 2>&1
83+
$AR_CC -o $SO_LIB $PARTS $AR_GLUE $EXTRA_LIBS > /dev/null 2>&1
8384

8485
return 0
8586
}

BeOS/linkcc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
LIBRARY="$1"; shift
3737

3838
# What we want to end up with.
39-
DYNAMIC=${LIBRARY%.a}.so
39+
DYNAMIC=${LIBRARY/.a/.so}
4040
LINK_DYNAMIC="-l$(basename ${DYNAMIC%.so} | sed -e s,lib,,)"
4141

4242
# Grab the rest of the args and build them into the command used to
@@ -61,10 +61,16 @@ done
6161
# a little overkill, but it'll be OK.
6262
LIBS="-lbe -lnet -lroot"
6363

64+
case $BE_HOST_CPU in
65+
ppc)
66+
LIBS="-nodup $LIBS"
67+
;;
68+
esac
69+
6470
# We'll need this or the python binary won't load libpython.so... handy
6571
# for testing.
66-
( cd .. ; ln -sf `pwd` lib )
72+
( cd .. ; ln -sf $(pwd) lib )
6773

6874
# Now build the python binary.
69-
echo "Link command: $LINK_CMD"
70-
$LINK_CMD
75+
echo "Link command: $LINK_CMD $LIBS"
76+
$LINK_CMD $LIBS

0 commit comments

Comments
 (0)