Skip to content

Commit

Permalink
Merge branch 'Cog' into build_pharo_win32_with_cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-cellier-aka-nice authored Mar 19, 2017
2 parents 91e2979 + c387052 commit 311c4eb
Show file tree
Hide file tree
Showing 165 changed files with 231,031 additions and 85,178 deletions.
17 changes: 15 additions & 2 deletions .travis_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,31 @@ build_osx() {
}

build_windows() {
echo "Building for Windows"

echo $ARCH
echo $FLAVOR

build_directory="./build.${ARCH}/${FLAVOR}/"

echo "${build_directory}"

[[ ! -d "${build_directory}" ]] && exit 100

pushd "${build_directory}"
# remove bochs plugins
echo "remove bochs plugins"
sed -i 's/Bochs.* //g' plugins.ext

echo "Let's build"
# We cannot zip dbg and ast if we pass -f to just to the full thing...
# Once this builds, let's pass -A instead of -f and put the full zip (but we should do several zips in the future)
bash -e ./mvm -f || exit 1
zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/"
zip -r "${output_file}.zip" "./build/vm/"
# zip -r "${output_file}.zip" "./builddbg/vm/" "./buildast/vm/" "./build/vm/"
popd
}


if [[ ! $(type -t build_$PLATFORM) ]]; then
echo "Unsupported platform '$(uname -s)'." 1>&2
exit 99
Expand Down
4 changes: 2 additions & 2 deletions build.linux32ARMv6/editpharoinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ SOURCE=../../sources/$SourceFile.sources
test -f $SOURCE || SOURCE=../../../sources/$SourceFile.sources
if [ -f squeak ]; then
mv squeak pharo
sed -i.bak 's/squeak/pharo/g' pharo
sed -i 's/squeak/pharo/g' pharo
fi
if [ -f bin/squeak ]; then
mv bin/squeak bin/pharo
sed -i.bak 's/squeak/pharo/g' bin/pharo
sed -i 's/squeak/pharo/g' bin/pharo
fi
rm -rf man doc
LIBDIR="`echo lib/squeak/[0-9.-]*`"
Expand Down
24 changes: 0 additions & 24 deletions build.linux32ARMv6/mkNamedPrims.sh

This file was deleted.

2 changes: 1 addition & 1 deletion build.linux32ARMv6/pharo.cog.spur/build.assert/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard" \
CXX=g++ \
CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" \
LIBS="-lpthread -luuid -lasound" \
LIBS="-lpthread -luuid -lasound -Wl,-rpath,'\$\$ORIGIN'" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
2 changes: 1 addition & 1 deletion build.linux32ARMv6/pharo.cog.spur/build.debug/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard" \
CXX=g++ \
CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" \
LIBS="-lpthread -luuid -lasound" \
LIBS="-lpthread -luuid -lasound -Wl,-rpath,'\$\$ORIGIN'" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
2 changes: 1 addition & 1 deletion build.linux32ARMv6/pharo.cog.spur/build/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -march=armv6 -mfpu=vfp -mfloat-abi=hard" \
CXX=g++ \
CFLAGS="$OPT -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DI_REALLY_DONT_CARE_HOW_UNSAFE_THIS_IS -DUSE_MIDI_ALSA -DCOGMTVM=0" \
LIBS="-lpthread -luuid -lasound" \
LIBS="-lpthread -luuid -lasound -Wl,-rpath,'\$\$ORIGIN'" \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
24 changes: 0 additions & 24 deletions build.linux32ARMv7/mkNamedPrims.sh

This file was deleted.

4 changes: 2 additions & 2 deletions build.linux32x86/editpharoinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ SOURCE=../../sources/$SourceFile.sources
test -f $SOURCE || SOURCE=../../../sources/$SourceFile.sources
if [ -f squeak ]; then
mv squeak pharo
sed -i.bak 's/squeak/pharo/g' pharo
sed -i 's/squeak/pharo/g' pharo
fi
if [ -f bin/squeak ]; then
mv bin/squeak bin/pharo
sed -i.bak 's/squeak/pharo/g' bin/pharo
sed -i 's/squeak/pharo/g' bin/pharo
fi
rm -rf man doc
LIBDIR="`echo lib/squeak/[0-9.-]*`"
Expand Down
24 changes: 0 additions & 24 deletions build.linux32x86/mkNamedPrims.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
2 changes: 1 addition & 1 deletion build.linux32x86/pharo.cog.spur/build.assert/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
2 changes: 1 addition & 1 deletion build.linux32x86/pharo.cog.spur/build.debug/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
4 changes: 2 additions & 2 deletions build.linux32x86/pharo.cog.spur/build.itimerheartbeat/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ i*86) ;; # we're good
fi ;;
esac

THIRDPARTYLIBS="libsdl2 libssh2 libgit2"
THIRDPARTYLIBS="libsdl2 openssl libssh2 libgit2"
INSTALLDIR=phcogspurlinux

# Some gcc versions create a broken VM using -O2
Expand Down Expand Up @@ -45,7 +45,7 @@ test -f config.h || ../../../platforms/unix/config/configure --without-npsqueak
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
4 changes: 2 additions & 2 deletions build.linux32x86/pharo.cog.spur/build/mvm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
# PharoVM with VM profiler and threaded heartbeat
THIRDPARTYLIBS="libsdl2 libssh2 libgit2"
THIRDPARTYLIBS="libsdl2 openssl libssh2 libgit2"

case "`uname -m`" in # ensure we see x86 as machine type
i*86) ;; # we're good
Expand Down Expand Up @@ -47,7 +47,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -m32" \
CXX="g++ -m32" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
6 changes: 5 additions & 1 deletion build.linux32x86/third-party/Makefile.libgit2
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ $(LIBGIT2ARCHIVE):
# NOTE: I'm adding this ugly hack of "sed..." because CMake does not find properly libssl and libcrypto
# on 64bits envirenments (it always find the 64bits version, regardless the architecture).
# this is ugly, but the only way I fond :(
# NOTE: We also need to edit the RPATH as CMAKE likes (because it ignores the -Wl line), that's why we
# need to add special flags as you can see here: https://cmake.org/Wiki/CMake_RPATH_handling
$(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME): $(LIBGIT2ARCHIVE)
tar x -f $(LIBGIT2ARCHIVE) -C $(THIRDPARTYDIR)
cd $(LIBGIT2DIR) \
Expand All @@ -31,11 +33,13 @@ $(THIRDPARTYLIBDIR)/$(LIBGIT2LIBNAME): $(LIBGIT2ARCHIVE)
-DBUILD_CLAR=OFF \
-DCMAKE_C_FLAGS="-m32" \
-DOPENSSL_FOUND=ON \
-DOPENSSL_INCLUDE_DIRS=$(THIRDPARTYINCLUDEDIR) \
-DOPENSSL_LIBRARY_DIRS=$(THIRDPARTYLIBDIR) \
-DOPENSSL_LIBRARIES=$(THIRDPARTYLIBDIR)/libssl.so \
-DLIBSSH2_FOUND=ON \
-DLIBSSH2_INCLUDE_DIRS=$(THIRDPARTYINCLUDEDIR) \
-DLIBSSH2_LIBRARY_DIRS=$(THIRDPARTYLIBDIR) \
-DLIBSSH2_LIBRARIES=$(THIRDPARTYLIBDIR)/libssh2.so.1.0.1 \
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath=$(THIRDPARTYLIBDIR) \
&& sed -i.bak 's/x86_64-linux-gnu/i386-linux-gnu/g' CMakeCache.txt \
&& make \
&& make install
Expand Down
6 changes: 4 additions & 2 deletions build.linux32x86/third-party/Makefile.libssh2
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ $(THIRDPARTYLIBDIR)/$(LIBSSH2LIBNAME): $(LIBSSH2ARCHIVE)
cd $(LIBSSH2DIR) \
&& ./configure \
--prefix='$(THIRDPARTYOUTDIR)' \
CFLAGS='-m32' \
LDFLAGS='-m32' \
--with-openssl \
--with-libssl-prefix=$(THIRDPARTYLIBDIR) \
CFLAGS='-m32 -L$(THIRDPARTYLIBDIR)' \
LDFLAGS='-m32 -L$(THIRDPARTYLIBDIR)' \
&& make \
&& make install

Expand Down
48 changes: 48 additions & 0 deletions build.linux32x86/third-party/Makefile.openssl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
ifndef THIRDPARTYDIR
include Makefile.lib.extra
endif
include ../../third-party/openssl.spec

# plugin definitions
OPENSSLURL:=$(openssl_spec_download_url)
OPENSSLLIBNAME:=$(openssl_spec_product1_name_linux)
OPENSSLALLLIBNAMES:=$(openssl_spec_product2_name_linux) $(OPENSSLLIBNAME)
OPENSSLDIR:=$(THIRDPARTYDIR)/$(openssl_spec_unpack_dir_name)
OPENSSLARCHIVE:=$(THIRDPARTYCACHEDIR)/$(openssl_spec_archive_name)
OPENSSLLIB:=$(THIRDPARTYINSTALLDIR)/$(OPENSSLLIBNAME)
OPENSSLSYMLINKS:=$(openssl_spec_symlinks_linux)

# ensure third-party library is built and recognised by plugins
INCDIRS:=$(INCDIRS) $(THIRDPARTYINCLUDEDIR)
EXTRALIBS:=$(EXTRALIBS) $(OPENSSLLIB)
PLUGINREQS:=$(THIRDPARTYLIBS)

$(OPENSSLARCHIVE):
curl -o $(OPENSSLARCHIVE) -L $(OPENSSLURL)

$(THIRDPARTYLIBDIR)/$(OPENSSLLIBNAME): $(OPENSSLARCHIVE)
tar x -f $(OPENSSLARCHIVE) -C $(THIRDPARTYDIR)
cd $(OPENSSLDIR) \
&& setarch i386 ./config -m32 --prefix='$(THIRDPARTYOUTDIR)' shared \
&& make install

# Assuming building libssl will also build libcrypto
$(OPENSSLLIB): $(THIRDPARTYLIBDIR)/$(OPENSSLLIBNAME)

openssl: $(OPENSSLLIB)

install:
@for each in $(OPENSSLALLLIBNAMES); do \
cp -f $(THIRDPARTYLIBDIR)/$$each $(THIRDPARTYINSTALLDIR); \
done
@echo "Installing links"
@for each in $(THIRDPARTYLIBDIR)/$(OPENSSLSYMLINKS); do \
if [ -L $$each ]; then \
cp -a $$each $(THIRDPARTYINSTALLDIR); \
fi \
done

all: $(THIRDPARTYOUTDIR) $(THIRDPARTYINSTALLDIR) $(THIRDPARTYCACHEDIR) openssl

clean:
rm -Rf $(OPENSSLDIR)
4 changes: 2 additions & 2 deletions build.linux64x64/editpharoinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ SOURCE=../../sources/$SourceFile.sources
test -f $SOURCE || SOURCE=../../../sources/$SourceFile.sources
if [ -f squeak ]; then
mv squeak pharo
sed -i.bak 's/squeak/pharo/g' pharo
sed -i 's/squeak/pharo/g' pharo
fi
if [ -f bin/squeak ]; then
mv bin/squeak bin/pharo
sed -i.bak 's/squeak/pharo/g' bin/pharo
sed -i 's/squeak/pharo/g' bin/pharo
fi
rm -rf man doc
LIBDIR="`echo lib/squeak/[0-9.-]*`"
Expand Down
24 changes: 0 additions & 24 deletions build.linux64x64/mkNamedPrims.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -m64" \
CXX="g++ -m64" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
2 changes: 1 addition & 1 deletion build.linux64x64/pharo.cog.spur/build.assert/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -m64" \
CXX="g++ -m64" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -m64" \
CXX="g++ -m64" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0 -DITIMER_HEARTBEAT=1" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
2 changes: 1 addition & 1 deletion build.linux64x64/pharo.cog.spur/build.debug/mvm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test -f config.h || ../../../platforms/unix/config/configure \
CC="gcc -m64" \
CXX="g++ -m64" \
CFLAGS="$OPT -msse2 -D_GNU_SOURCE -DCOGMTVM=0" \
LIBS="-lpthread -luuid" \
LIBS="-lpthread -luuid -Wl,-rpath,'\$\$ORIGIN' " \
LDFLAGS=-Wl,-z,now
rm -f vm/sqUnixMain.o # nuke version info
rm -rf ../../../products/$INSTALLDIR
Expand Down
Loading

0 comments on commit 311c4eb

Please sign in to comment.