Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #343 from sifive/detect-medany-incompatible
Browse files Browse the repository at this point in the history
Script to detect code model incompatibility
  • Loading branch information
nategraff-sifive authored Aug 16, 2019
2 parents e569524 + d308dce commit ca9de9a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/detect-medany-incompatible
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# This script detects when the medany code model is insufficient to support
# a target's memory layout.

OUTPUT=`./scripts/all-targets-build 2>&1`

if [ `echo $OUTPUT | grep -c "PCREL"` -ne 0 ] ; then
>&2 echo "ERROR: The linker is reporting a PC-relative addressing error."
>&2 echo " This usually indicates that the memory layout for the"
>&2 echo " target is incompatible with the selected code model."
>&2 echo " Here, it probably means that this target requires support"
>&2 echo " for the 'large' code model and cannot be supported with the"
>&2 echo " current toolchain."
exit 1
fi

0 comments on commit ca9de9a

Please sign in to comment.