Changeset 5389


Ignore:
Timestamp:
Jul 19, 2016 7:41:15 AM (3 years ago)
Author:
nanang
Message:

Misc (re #1928): Updated configure-android to add sysroot setting in CFLAGS and LDFLAGS. This update will also remove linking warning 'cannot find entry symbol _start'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/configure-android

    r5213 r5389  
    116116  export RANLIB=`echo ${NDK_CXX}|sed 's/-g++/-ranlib/'`; 
    117117 
    118   export LDFLAGS="${LDFLAGS} -nostdlib -L${ANDROID_SYSROOT}${USR_LIB}" 
     118  export LDFLAGS="${LDFLAGS} --sysroot=${ANDROID_SYSROOT}" 
    119119  export LIBS="${LIBS} -lc -lgcc -ldl" 
    120120  export CFLAGS="${NDK_CFLAGS} ${CFLAGS}" 
     
    149149  export RANLIB="${ANDROID_TC}/bin/${TARGET_HOST}-ranlib" 
    150150 
    151   export LDFLAGS="${LDFLAGS} -nostdlib -L${ANDROID_SYSROOT}${USR_LIB}" 
     151  export LDFLAGS="${LDFLAGS} --sysroot=${ANDROID_SYSROOT}" 
    152152  export LIBS="${LIBS} -lc -lgcc" 
    153   export CFLAGS="${CFLAGS} -I${ANDROID_SYSROOT}/usr/include" 
     153  export CFLAGS="${CFLAGS} --sysroot=${ANDROID_SYSROOT}" 
    154154  export CPPFLAGS="${CFLAGS} -fexceptions -frtti" 
    155155  export CXXFLAGS="${CXXFLAGS} -shared --sysroot=${ANDROID_SYSROOT} -fexceptions -frtti" 
     
    168168STDCPP_TC_VER=`ls -d ${ANDROID_NDK_ROOT}/sources/cxx-stl/gnu-libstdc++/[0-9]* | sort -gr | head -1` 
    169169STDCPP_CFLAGS="-I${STDCPP_TC_VER}/include -I${STDCPP_TC_VER}/libs/${TARGET_ABI}/include" 
    170 STDCPP_LIBS="${ANDROID_SYSROOT}${USR_LIB}/crtbegin_so.o -lgnustl_static" 
     170STDCPP_LIBS="-lgnustl_static" 
    171171STDCPP_LDFLAGS="-L${STDCPP_TC_VER}/libs/${TARGET_ABI}/" 
    172172 
    173173# stlport 
    174174#STDCPP_CFLAGS="-I${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/stlport" 
    175 #STDCPP_LIBS="${ANDROID_SYSROOT}${USR_LIB}/crtbegin_so.o -lstlport_static -ldl" 
     175#STDCPP_LIBS="-lstlport_static -ldl" 
    176176#STDCPP_LDFLAGS="-L${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/libs/${TARGET_ABI}" 
    177177 
Note: See TracChangeset for help on using the changeset viewer.