-
-
Notifications
You must be signed in to change notification settings - Fork 3
add libxml2 and fix build issues #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
dc75f2c
Updated deps and compilers
cmaglie f9d111c
some other updates
lucarin91 c4a045c
add libxml2
lucarin91 1e6fbe8
add configure_toolchain script
lucarin91 5c110a8
include archive instead of a folder
lucarin91 3572f03
fix linters
lucarin91 03fa97f
make configure_toolchain.sh executable
lucarin91 41f4a99
Update Dockerfile
lucarin91 9f7bb52
make formatter happy
lucarin91 4db2218
update readme
lucarin91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash -e | ||
Check failure on line 1 in configure_toolchain.sh
|
||
|
||
# Check if the CROSS_COMPILE variable is set | ||
if [ -z "$CROSS_COMPILE" ]; then | ||
echo "Error: CROSS_COMPILE is not set. Please specify the toolchain prefix (e.g., arm-linux-gnueabihf-)." | ||
exit 1 | ||
fi | ||
|
||
# Detect if the toolchain is osxcross | ||
if [[ "$CROSS_COMPILE" == *"apple-darwin"* ]]; then | ||
# Set osxcross-specific tools | ||
export CC="o64-clang" | ||
export CXX="o64-clang++" | ||
else | ||
export CC="${CROSS_COMPILE}-gcc" | ||
export CXX="${CROSS_COMPILE}-g++" | ||
fi | ||
|
||
# Set default compilation flags | ||
export AR="${CROSS_COMPILE}-ar" | ||
export RANLIB="${CROSS_COMPILE}-ranlib" | ||
export LD="${CROSS_COMPILE}-ld" | ||
export STRIP="${CROSS_COMPILE}-strip" | ||
export CFLAGS="-O2" | ||
export CXXFLAGS="$CFLAGS" | ||
|
||
# Add toolchain's lib directory to library paths | ||
TOOLCHAIN_LIB_DIR="/opt/lib/${CROSS_COMPILE%/}/lib" | ||
TOOLCHAIN_INCLUDE_DIR="/opt/lib/${CROSS_COMPILE%/}/include" | ||
export LIBRARY_PATH="$TOOLCHAIN_LIB_DIR:$LIBRARY_PATH" | ||
export PKG_CONFIG_PATH="$TOOLCHAIN_LIB_DIR/pkgconfig:$PKG_CONFIG_PATH" | ||
export CPATH="$TOOLCHAIN_INCLUDE_DIR:$CPATH" | ||
export C_INCLUDE_PATH="$TOOLCHAIN_INCLUDE_DIR:$C_INCLUDE_PATH" | ||
export CPLUS_INCLUDE_PATH="$TOOLCHAIN_INCLUDE_DIR:$CPLUS_INCLUDE_PATH" | ||
|
||
echo "Configured toolchain: $CROSS_COMPILE" | ||
echo " CC=$CC, CXX=$CXX, AR=$AR, RANLIB=$RANLIB, LD=$LD, STRIP=$STRIP" | ||
echo " CFLAGS=$CFLAGS, CXXFLAGS=$CXXFLAGS, LDFLAGS=$LDFLAGS" | ||
echo " LIBRARY_PATH=$LIBRARY_PATH" | ||
echo " LD_LIBRARY_PATH=$LD_LIBRARY_PATH" | ||
echo " PKG_CONFIG_PATH=$PKG_CONFIG_PATH" | ||
echo " CPATH=$CPATH" | ||
echo " C_INCLUDE_PATH=$C_INCLUDE_PATH" | ||
echo " CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH" | ||
|
||
# Execute the provided command | ||
exec "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.