Comments (5)
See: Bootstrapping fbc on a new system
What is it that you are trying to do?
If you are using 'make bootstrap-dist' to create a package and 'make bootstrap' to build it, then files are expected to be in ./bootstrap.
If you are following the manual steps, then files are expected to be in ./lib/freebasic.
I added an example to the wiki showing the how to create and use a bootstrap package in more detail.
from fbc.
Eric, weird, I received your response notification with the option to view it here (but it is not here).
Interesting paper, thanks for the link. https://www.acsa-admin.org/countering-trusting-trust-through-diverse-double-compiling/
Yes, fbc is a self-hosting compiler. The process for building a new fbc has always been, since the beginning of fbc, to build the new version with an installation of the previous official release, and using cross-compiling to other systems where fbc is not yet available.
Makefile targets 'bootstrap-dist' and 'bootstrap' are a means to create a bootstrap compiler for a few popular host/targets by taking the emitted .c or .asm from the build system to the host/target system. We don't have a separately maintained version of fbc written in some other language (like C or assembler) to bootstrap from independently.
For our Travis-CI builds, we use the previous official release of fbc to build the next release. You can see our scripts here: https://github.com/freebasic/fbc/tree/master/contrib/travis
Does this information answer the issue report?
from fbc.
from fbc.
Eric, I appreciate you giving your (free) time to provide more information (I get the immediate impression that you have much more knowledge on this subject). If there's nothing else to add to this issue, can probably just close it out.
yea, it would be difficult to answer, with confidence, the question of "does the toolchain have a trojan?" given our current practices.
Then the bootstrap-from-source story becomes 1) grab the bootstrap sources, 2) use those to build a bootstrap-fbc, then 3) use the bootstrap-fbc to build fbc.
There are bootstrap source versions available last few fbc releases. So, I wrote the following script, 1) to provide another example related to the issue report, and 2) at least minimally, answer for myself, the question "is the bootstrap package self consistent?"
I only tried with FreeBASIC-1.05.0-source-bootstrap.tar.xz
so far. (Sorry about the '~/' paths, but I'm not sure how the process will handle relative paths.)
#!/bin/sh
set -ex
# bootstrap source versions available are:
# 1.02.0, 1.02.1, 1.03.0, 1.04.0, 1.05.0
bootstrap_version='1.05.0'
bootstrap_package='FreeBASIC-1.05.0-source-bootstrap'
download_url='https://github.com/freebasic/fbc/releases/download'
# download source for the bootstrap compiler
cd ~
wget -O $bootstrap_package.tar.xz $download_url/$bootstrap_version/$bootstrap_package.tar.xz
tar xf $bootstrap_package.tar.xz
# build the bootstrap complier (c/asm sources)
cd ~/$bootstrap_package
make bootstrap
# rebuild the compiler (bas sources) using bootstrap compiler
cd ~/$bootstrap_package
make "FBC=~/$bootstrap_package/bin/fbc -i ~/$bootstrap_package/inc"
# At this point we'd like to also rebuild the bootstrap package to compare, but
# currently, '$ make bootstrap-dist' expects to be made in a clone of the git repo, so,
# we would need to make some modifications to the makefile first to have this work:
# $ cd ~/$bootstrap_package
# $ make bootstrap-dist "FBC=~/$bootstrap_package/bin/fbc -i ~/$bootstrap_package/inc"
# instead, remove the ./bootstrap directory, and create a fake git repo:
cd ~/$bootstrap_package
rm -rf bootstrap
git init
git add .
git -c user.name="none" -c user.email="none" commit -m "bootstrap"
# make a new bootstrap package using newly built compiler
make bootstrap-dist "FBC=~/$bootstrap_package/bin/fbc -i ~/$bootstrap_package/inc"
# compare the contents of the 2 bootstrap packages:
tardiff --modified ~/$bootstrap_package.tar.xz ~/$bootstrap_package/$bootstrap_package.tar.xz
Turns out, for me, there is a difference by one file: `./contrib/swig/swig.exe' that probably wasn't meant to be in the original bootstrap package.
from fbc.
Yes. Thank you for your time and thoughtful treatment of the subject. Perhaps I will make some time next weekend to look at this again. Regardless, I think it makes sense to close this issue. Cheers!
from fbc.
Related Issues (20)
- _FILE_OBJECT bug HOT 5
- The _DISPATCHER_HEADER structure is incorrect HOT 2
- _IRP Statement bugfix HOT 6
- How to modify FB code to use FB built-in functions in driver development? HOT 1
- unit-tests stuck on ascii HOT 8
- FreeBASIC support for Linux on PowerPC and PowerPC64? HOT 4
- libstdc++-related problems in log-tests HOT 10
- Support for SOURCE_DATE_EPOCH HOT 4
- Golang and FreeBasic HOT 1
- File Append Bug HOT 1
- Date Format Bug HOT 2
- Could fbc achieve the same effect as making a share section in dll HOT 1
- cannot find -ldisphelper HOT 2
- build FreeBasic on macOS 13.1 with clang HOT 1
- if statement fail on div0 HOT 6
- MOVE TO DISCUSSIONS: hdpmi32 and cwsdpmi in dosbox HOT 2
- mangled out
- mangled output windows commandline when using wstr and pipe
- Brecht Sanders MinGW-W64 refrence possibly rather excessive in compiled exe with gcc HOT 9
- fbc64 version 1.20 crashed under Windows 10 64 bit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fbc.