Enable goto-cc to build and link Xen#1357
Closed
tautschnig wants to merge 2 commits intodiffblue:developfrom
Closed
Enable goto-cc to build and link Xen#1357tautschnig wants to merge 2 commits intodiffblue:developfrom
tautschnig wants to merge 2 commits intodiffblue:developfrom
Conversation
cd6f379 to
a550377
Compare
a550377 to
eead8d7
Compare
Collaborator
Author
|
Marking do-not-merge as it is an unhealthy mix of different bugfixes. Yet it makes a Xen build succeed when using the following script: #!/usr/bin/env bash
# this should reproduce the compilation problem with goto-gcc on upstream Xen
set -e
# tested on Ubuntu 14.04
sudo apt-get install bcc python-dev uuid-dev libaio-dev libyajl-dev
# get upstream xen, move to staging branch
if [ ! -d xen.git ]
then
git clone git://xenbits.xen.org/xen.git xen.git
fi
cd xen.git
git checkout staging
# the following patch is required to work around embedded-C problems
#--- a/xen/Makefile
#+++ b/xen/Makefile
#@@ -189,7 +189,7 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
# echo "#ifndef __ASM_OFFSETS_H__"; \
# echo "#define __ASM_OFFSETS_H__"; \
# echo ""; \
#- sed -rne "/==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}"; \
#+ sed -rne "/^[^#].*==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}"; \
# echo ""; \
# echo "#endif") <$< >$@
#
# install goto-gcc as gcc replacement
mkdir -p hooks
pushd hooks
echo "goto-gcc --native-compiler /usr/bin/gcc \"\$@\"" > gcc
echo "goto-bcc --native-compiler /usr/bin/bcc \"\$@\"" > bcc
echo "goto-g++ --native-compiler /usr/bin/g++ \"\$@\"" > g++
echo "goto-as86 --native-assembler /usr/bin/as86 \"\$@\"" > as86
chmod u+x *
export PATH=$(pwd):$PATH
popd
export PATH=$HOME/cbmc-github.git/src/goto-cc:$HOME/cbmc-github.git/scripts:$PATH
# (re)build xen with goto-gcc as gcc replacement
./configure LD=goto-ld
make xen -j 1 LD=goto-ld |
795ecc9 to
d6079a9
Compare
Running objcopy on EFI binaries does not work, hence we need to give up on the goto-cc sections in a graceful manner.
As long as the bit-width of parameters matches, we should be able to obtain sane results.
d6079a9 to
7a09ada
Compare
Collaborator
Author
|
Rebased against latest develop to reduce the patch set to those that are specific to Xen (and thus retitled). Keeping do-not-merge as the linker hack is dubious and a full set-up for an integration test should be included (and that test should be performed) -- that test should just use the script posted above. |
Collaborator
Author
|
Closing as #2557 contains all the necessary fixes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.