/usr/src/gcc-5/debian/patches/libjava-fixed-symlinks.diff is in gcc-5-source 5.5.0-12ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # DP: Remove unneed '..' elements from symlinks in JAVA_HOME
Index: b/src/libjava/Makefile.am
===================================================================
--- a/src/libjava/Makefile.am
+++ b/src/libjava/Makefile.am
@@ -836,7 +836,7 @@ if CREATE_JAVA_HOME
$(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
relative() { \
$(PERL) -e 'use File::Spec; \
- print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
+ print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2 | sed -r 's,(bin|lib)[^/]*/\.\./,,'; \
}; \
RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
Index: b/src/libjava/Makefile.in
===================================================================
--- a/src/libjava/Makefile.in
+++ b/src/libjava/Makefile.in
@@ -12506,7 +12506,7 @@ install-data-local:
@CREATE_JAVA_HOME_TRUE@ $(mkinstalldirs) $(DESTDIR)$(SDK_INCLUDE_DIR)/$(OS)
@CREATE_JAVA_HOME_TRUE@ relative() { \
@CREATE_JAVA_HOME_TRUE@ $(PERL) -e 'use File::Spec; \
-@CREATE_JAVA_HOME_TRUE@ print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2; \
+@CREATE_JAVA_HOME_TRUE@ print File::Spec->abs2rel($$ARGV[0], $$ARGV[1])' $$1 $$2 | sed -r 's,(bin|lib)[^/]*/\.\./,,'; \
@CREATE_JAVA_HOME_TRUE@ }; \
@CREATE_JAVA_HOME_TRUE@ RELATIVE=$$(relative $(DESTDIR)$(bindir) $(DESTDIR)$(SDK_BIN_DIR)); \
@CREATE_JAVA_HOME_TRUE@ ln -sf $$RELATIVE/`echo gij | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` \
|