https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79403
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW --- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > The files are symlinks in the build tree, mode 640 in the source tree (like > everything else) and are installed with "cp -p" which explains the broken > permissions. Most other things are installed "install -m 644". Right, there are "chmod a+r" or "chmod 644" all over the place. But we cannot use 644 because we cannot have write access for the ALI files. > Perhaps because few people install a system Ada compiler from sources. Well, I guess not many people use your very unusual setup either... This has remained unchanged in the Makefile for 25 years! Untested patch: Index: gcc-interface/Makefile.in =================================================================== --- gcc-interface/Makefile.in (revision 245271) +++ gcc-interface/Makefile.in (working copy) @@ -2687,8 +2687,8 @@ install-gnatlib: ../stamp-gnatlib-$(RTSD for file in $(RTSDIR)/*.ad[sb]*; do \ $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \ done - cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb - cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads + cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx+r *.adb + cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx+r *.ads ../stamp-gnatlib2-$(RTSDIR): $(RM) $(RTSDIR)/s-*.ali @@ -2800,7 +2800,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../ $(RTSDIR)/memtrack.o $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext) endif - $(CHMOD) a-wx $(RTSDIR)/*.ali + $(CHMOD) a-wx+r $(RTSDIR)/*.ali touch ../stamp-gnatlib-$(RTSDIR) # Warning: this target assumes that LIBRARY_VERSION has been set correctly.