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
[RFC] custom runtimes & reproducible builds #1845
Changes from 2 commits
482f5b1
808057a
a49ddd7
0c44e0a
7a15070
27e167a
23b2dec
4c050bf
dcfea01
da87d27
981974b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* Determine whether the C compiler supports -fdebug-prefix-map */ | ||
|
||
/* This file is to be preprocessed and its output examined. */ | ||
/* It is not C source code to be executed. */ | ||
/* This helps with cross-compilation. */ | ||
|
||
#if defined(__INTEL_COMPILER) | ||
false | ||
#elif defined(__clang_major__) && defined(__clang_minor__) | ||
#if __clang_major__ >= 7 | ||
true | ||
#else | ||
false | ||
#endif | ||
#elif defined(__GNUC__) && defined(__GNUC_MINOR__) | ||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) | ||
true | ||
#else | ||
false | ||
#endif | ||
#elif defined(__xlc__) && (__xlC__) | ||
false | ||
#else | ||
false | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -409,6 +409,7 @@ export cc verbose | |
# Determine the C compiler family (GCC, Clang, etc) | ||
|
||
ccfamily=`$cc -E cckind.c | grep '^[a-z]' | tr -s ' ' '-'` | ||
cc_has_debug_prefix_map=`$cc -E cc_has_debug_prefix_map.c | grep '^[a-z]'` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about just passing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, I reused the logic from |
||
case $? in | ||
0) inf "Compiler family and version: $ccfamily.";; | ||
*) err "Unable to preprocess the test program.\n" \ | ||
|
@@ -2167,6 +2168,7 @@ config AFL_INSTRUMENT "$afl_instrument" | |
config MAX_TESTSUITE_DIR_RETRIES "$max_testsuite_dir_retries" | ||
config FLAT_FLOAT_ARRAY "$flat_float_array" | ||
config AWK "awk" | ||
config CC_HAS_DEBUG_PREFIX_MAP "$cc_has_debug_prefix_map" | ||
|
||
|
||
rm -f tst hasgot.c | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably not pass this option if
-dcamlprimc
is passed as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure; it makes the build reproducible even if you change
the output name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that my definition of "reproducible" was slightly
broken: I understood it as "produces the same contents"
while it is "produces the contents in the same file".