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

Build artificial samples with scons instead of make #16

Merged
merged 6 commits into from
Apr 5, 2019
Merged

Conversation

tbarabosch
Copy link
Contributor

This PR exchanges make with scons. This makes building the artificial samples painless!!!

@tbarabosch tbarabosch requested a review from Enkelmann March 29, 2019 22:05
Copy link
Contributor

@Enkelmann Enkelmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks much better than the old makefile!

But when running scons I get an error

scons: Reading SConscript files ...
Building for architecture x64
AttributeError: 'module' object has no attribute 'which':
  File "[...]/cwe_checker/test/artificial_samples/SConstruct", line 71:
    build_c(arch)
  File "[...]/cwe_checker/test/artificial_samples/SConstruct", line 42:
    if shutil.which(c_compilers[arch]) is not None:

so right now scons doesn't build anything on my computer.

env = Environment(CC = c_compilers[arch],
CCFLAGS = c_flags[arch] + optimize(str(p)))
env.Program('build/%s_%s.out' % (str(p).split('.')[0], arch), 'build/%s' % str(p))
# TODO: call execstack -s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a test right now that depends on the call of execstack?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe none, I do not know why it was there in the first place.

@tbarabosch
Copy link
Contributor Author

Scons3 does not work properly on Ubuntu 16.04/18.04, but on current Fedora. So switching to scons2 (pip install --user scons). Now it should compile all binaries.

@Enkelmann Enkelmann merged commit c0716c2 into master Apr 5, 2019
@tbarabosch tbarabosch deleted the scons branch April 5, 2019 11:58
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.

2 participants