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 #344 from sifive/detect-medany-incompatible-1908
Browse files Browse the repository at this point in the history
[19.08 Backport] Script to detect code model incompatibility
  • Loading branch information
nategraff-sifive authored Aug 16, 2019
2 parents bfe1074 + 55eac80 commit 8b31f54
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 8b31f54

Please sign in to comment.