Skip to content
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

misc bug fixes + enable LTO support #19

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

ddcc
Copy link

@ddcc ddcc commented Sep 23, 2020

Tested on Ubuntu 20.04

@ddcc ddcc force-pushed the master branch 3 times, most recently from 60a714e to d44f275 Compare September 23, 2020 23:33
@ddcc ddcc force-pushed the master branch 5 times, most recently from e79e065 to fcd97ed Compare September 24, 2020 02:04
@FeynmanDNA
Copy link

@GJDuck hi, I git cloned the forked repo from @ddcc and tested this PR on my laptop Linux Mint 20.3 (which is based on Ubuntu 20.04 package base). This PR works on my linux machine, ie. I can compile LowFat and use it successfully.

Like the issue #20 mentioned, I also could not get LowFat to compile on my Mint 20.3, but this PR can compile.

Environment

OS: Linux Mint 20.3 (Una)
Version of the Linux kernel: 5.4.0-104-generic

Software Tested

I happen to keep some logs of software built with LowFat before I upgraded my Mint distro, and I get to compare the before-and-after logs. Here are some software I compared and found no difference in the output:

  • Sqlite 3.32
  • Git 2.35

and a couple of simple toy examples from coursework

Additional Dependencies

I found that I had to install binutil-dev for the <plugin-api.h>, other I get this error:

/LowFat_ddcc_PR19/llvm-4.0.0.src/tools/gold/gold-plugin.cpp:31:10: fatal error: plugin-api.h: No such file or directory
  31 | #include <plugin-api.h>
     |          ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [tools/gold/CMakeFiles/LLVMgold.dir/build.make:76: tools/gold/CMakeFiles/LLVMgold.dir/gold-plugin.cpp.o] Error 1
sudo apt-get install binutils-dev
Preparing to unpack .../binutils-dev_2.34-6ubuntu1.3_amd64.deb ...
Unpacking binutils-dev (2.34-6ubuntu1.3) ...
Setting up binutils-dev (2.34-6ubuntu1.3) ...

Otherwise the build shell script works.

@GJDuck
Copy link
Owner

GJDuck commented Mar 30, 2022

@FeynmanDNA thanks for testing it. I also tried on an old 16.04 system and it seems to build.

Regarding 8925330, there is a reason why the preinit array is used. Although it has been a few years so I forget the exact reason. Likely some cherry picking will be required.

@GJDuck
Copy link
Owner

GJDuck commented Apr 26, 2022

Just an update on this. I attempted to selectively merge specific patches, but the resulting build would fail the tests due to a misaligned stack. For me, the stack is misaligned regardless on whether 92fa1e0 is used or not, so I am not sure what the problem is. I will get back to this one day...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants