parent
e102215755
commit
3d03607120
|
@ -46,23 +46,31 @@ pre_configure() {
|
|||
if [ "$CROSS_BUILD" ]; then
|
||||
CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= cmake .
|
||||
make comp_err comp_sql gen_lex_hash gen_lex_token
|
||||
mkdir -p bin.host
|
||||
cp extra/comp_err bin.host
|
||||
cp scripts/comp_sql bin.host
|
||||
cp sql/gen_lex_hash bin.host
|
||||
cp sql/gen_lex_token bin.host
|
||||
mkdir -p bin.host/{extra,scripts,sql}
|
||||
cp extra/comp_err bin.host/extra
|
||||
cp scripts/comp_sql bin.host/scripts
|
||||
cp sql/gen_lex_hash bin.host/sql
|
||||
cp sql/gen_lex_token bin.host/sql
|
||||
make clean
|
||||
# Remove the rules for the host binaries to not
|
||||
# have them overwritten with target binaries
|
||||
rm CMakeCache.txt
|
||||
vsed -i ${wrksrc}/scripts/CMakeLists.txt \
|
||||
-e "/ADD_EXECUTABLE(comp_sql/d"
|
||||
vsed -i ${wrksrc}/sql/CMakeLists.txt \
|
||||
-e "/ADD_EXECUTABLE(gen_lex_hash/d" \
|
||||
-e "/ADD_EXECUTABLE(gen_lex_token/d" \
|
||||
-e "/ADD_DEPENDENCIES(gen_lex_token/d"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_build() {
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
cp bin.host/comp_err ${wrksrc}/extra
|
||||
cp bin.host/comp_sql ${wrksrc}/scripts
|
||||
cp bin.host/gen_lex_hash ${wrksrc}/sql
|
||||
cp bin.host/gen_lex_token ${wrksrc}/sql
|
||||
export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql
|
||||
mkdir -p ${wrksrc}/build
|
||||
cp -a ${wrksrc}/bin.host/* ${wrksrc}/build
|
||||
mkdir -p ${wrksrc}/build/libmysqld
|
||||
cp ${wrksrc}/bin.host/sql/gen_lex_token ${wrksrc}/build/libmysqld
|
||||
export PATH=${PATH}:${wrksrc}/build/extra:${wrksrc}/build/scripts:${wrksrc}/build/sql
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue