Преглед изворни кода

mesa: fix static library construction

If the .a is made of other .a files, extract the objects from the later.
tags/mesa_7_3_rc1
Brian Paul пре 17 година
родитељ
комит
145d49838f
1 измењених фајлова са 23 додато и 1 уклоњено
  1. 23
    1
      bin/mklib

+ 23
- 1
bin/mklib Прегледај датотеку

@@ -260,9 +260,31 @@ case $ARCH in
OPTS=${ALTOPTS}
fi
rm -f ${LIBNAME}

# expand any .a objects into constituent .o files.
NEWOBJECTS=""
DELETIA=""
for OBJ in ${OBJECTS} ; do
if [ `expr match $OBJ '.*\.a'` -gt 0 ] ; then
# extract the .o files from this .a archive
FILES=`ar t $OBJ`
ar x $OBJ
NEWOBJECTS="$NEWOBJECTS $FILES"
# keep track of temporary .o files and delete them below
DELETIA="$DELETIA $FILES"
else
# ordinary .o file
NEWOBJECTS="$NEWOBJECTS $OBJ"
fi
done

# make lib
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
${LINK} ${OPTS} ${LIBNAME} ${NEWOBJECTS}
ranlib ${LIBNAME}

# remove temporary extracted .o files
rm -f ${DELETIA}

# finish up
FINAL_LIBS=${LIBNAME}
else

Loading…
Откажи
Сачувај