Build: Also strip workspace from __FILE__

Add another -fmacro-prefix-map argument to the GCC/Clang command line
which strips the name of the workspace from the __FILE__ macro. This
applies primarily to files which live outside of TF-M and will ensure
that the following transformations now occur:

/workspace/tf-m-tests/directory/file.c -> tf-m-tests/directory/file.c
/workspace/trusted-firmware-m/directory/file.c -> directory/file.c

This ensures that we remove user specific elements of the build which
also keeping assertions traceable (as we can easily see source files
that are located outside of trusted-firmware-m).

Change-Id: I26cd1e0049120ba108524ddedaed6b6b69f60dcf
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
diff --git a/toolchain_GNUARM.cmake b/toolchain_GNUARM.cmake
index 7fdfb84..294f96d 100644
--- a/toolchain_GNUARM.cmake
+++ b/toolchain_GNUARM.cmake
@@ -106,6 +106,8 @@
     endif()
 endif()
 
+file(REAL_PATH "${CMAKE_SOURCE_DIR}/../" TOP_LEVEL_PROJECT_DIR)
+
 add_compile_options(
     -specs=nano.specs
     -specs=nosys.specs
@@ -119,6 +121,9 @@
     -fno-builtin
     -fshort-enums
     -funsigned-char
+    # Strip /workspace/
+    -fmacro-prefix-map=${TOP_LEVEL_PROJECT_DIR}/=
+    # Strip /workspace/trusted-firmware-m
     -fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=
     -mthumb
     $<$<COMPILE_LANGUAGE:C>:-std=c99>