diff -Nru fpc-2.6.2/debian/changelog fpc-2.6.2/debian/changelog --- fpc-2.6.2/debian/changelog 2013-05-30 20:27:38.000000000 +0000 +++ fpc-2.6.2/debian/changelog 2013-07-23 21:51:28.000000000 +0000 @@ -1,16 +1,43 @@ +fpc (2.6.2-3) unstable; urgency=high + + [Abou Al Montacir] + * Added a new directive, CFGDIR, to configuration file allowing one to add a + directory to a list where included configuration files are searched. + * Define a default location, multi-arch compatible, for third party units, + which should be installed in /usr/lib/$fpctarget-gnu/fp-units-2.6.2/$pkg/. + Each fp-units package should install a configuration file called $pkg.cfg + in configuration directory /etc/fp-units-$fpcversion.cfg.d/$fpctarget/. + * Use compiler configuration file to pass debian custom compilaer flags. + * Pass "-z relro" to linker to remove lintian error. + * Restored ppc64 compiler man page. (Closes: Bug#716813) + + [Peter Michael Green] + * Use "FPMAKE_SKIP_CONFIG" rather than "FPCFPMAKE" to pass linker option + needed for building fpmake. This method unlike the previous one shouldn't + break crossbuilding. (though I don't know if crossbuilding works in + general) + * Change way patching is done for doc build to fix build with newer + versions of patch. + * Remove conflicts with binutils-gold (Closes: Bug#717651) + * Use ld.bfd explicitly (Helps with: Bug#624525) + * Use urgency high so that above binutils related changes hopefully get into + Testing before new binutils does. + + -- Peter Michael Green Tue, 23 Jul 2013 21:48:50 +0000 + fpc (2.6.2-2) unstable; urgency=low [Abou Al Montacir] * debian/rules - Allow generating each autogenrated file separately on demand. - - Avoid changing content of hidden directory .pc as this is used by quilt and changing its content may cause some tricky issues. + - Avoid changing content of hidden directory .pc as this is used by quilt and changing its content may cause some tricky issues. [Peter Michael Green] * debian/patches/armhf-build-with-2.6.0 - fixup some conditionals in arm assembler to avoid using instrutions that fpc 2.6.0 doesn't support when building the rtl with 2.6.0 (first stage) * debian/rules - - Pass 'PPCFPMAKE=$PPCNEW -Fl/usr/lib/$(DEB_BUILD_MULTIARCH)' during + - Pass 'PPCFPMAKE=$PPCNEW -Fl/usr/lib/$(DEB_BUILD_MULTIARCH)' during packages build so that fpmake links successfully. - Pass 'OPT=-Fl/usr/lib/$(DEB_HOST_MULTIARCH)' during utils build so fpdoc links successfully. @@ -57,13 +84,14 @@ * Fix lookup keys in debconf database. (Closes: Bug#706459) * Fixed typo in variable name in post installation script for fp-compiler package. - * Apply sed changes directly on new configuration file and update - alternatives later. Using sed -i on symbolic link seems to change it on + * Apply sed changes directly on new configuration file and update + alternatives later. Using sed -i on symbolic link seems to change it on plain file introducing a regression. * Fix lintian wraning about questions in debconf prompts. [ Peter Michael Green ] * Upload to unstable + -- Peter Michael Green Sun, 5 May 2013 22:02:00 +0000 fpc (2.6.0-11) experimental; urgency=low diff -Nru fpc-2.6.2/debian/control fpc-2.6.2/debian/control --- fpc-2.6.2/debian/control 2013-05-30 20:11:34.000000000 +0000 +++ fpc-2.6.2/debian/control 2013-07-23 18:50:40.000000000 +0000 @@ -59,7 +59,6 @@ Suggests: fp-docs-2.6.2 (>= ${source:Upstream-Version}), mingw32-binutils Provides: fp-compiler Breaks: fp-compiler (<= 2.4.0-3), fp-utils-2.4.4 (<= 2.4.4-2), fp-utils-2.4.2 (<= 2.4.2-3) -Conflicts: binutils-gold Replaces: fp-compiler (<= 2.4.0-3), fp-utils-2.4.4 (<= 2.4.4-1) Description: Free Pascal - compiler The Free Pascal Compiler is an Object Pascal compiler supporting both Delphi diff -Nru fpc-2.6.2/debian/deb-build-fpc.cfg fpc-2.6.2/debian/deb-build-fpc.cfg --- fpc-2.6.2/debian/deb-build-fpc.cfg 1970-01-01 00:00:00.000000000 +0000 +++ fpc-2.6.2/debian/deb-build-fpc.cfg 2013-07-23 20:40:10.000000000 +0000 @@ -0,0 +1,3 @@ +# FPC configuration file for build system tools +-k-z relro +-Fl/usr/lib/x86_64-linux-gnu diff -Nru fpc-2.6.2/debian/deb-host-fpc.cfg fpc-2.6.2/debian/deb-host-fpc.cfg --- fpc-2.6.2/debian/deb-host-fpc.cfg 1970-01-01 00:00:00.000000000 +0000 +++ fpc-2.6.2/debian/deb-host-fpc.cfg 2013-07-23 21:59:09.000000000 +0000 @@ -0,0 +1,3 @@ +# FPC configuration file for host system applications +-k-z relro +-Fl/usr/lib/x86_64-linux-gnu diff -Nru fpc-2.6.2/debian/fp-compiler.postinst.in fpc-2.6.2/debian/fp-compiler.postinst.in --- fpc-2.6.2/debian/fp-compiler.postinst.in 2013-05-05 21:59:03.000000000 +0000 +++ fpc-2.6.2/debian/fp-compiler.postinst.in 2013-07-23 18:46:15.000000000 +0000 @@ -29,6 +29,13 @@ # Add multiarch path to /etc/fpc.cfg so executables linked against libc can be corectly linked echo '# multiarch library search path' >> ${PKG_CFG_PATH} echo '-Fl/usr/lib/$fpctarget-*' >> ${PKG_CFG_PATH} +# Define a default location, multi-arch compatible, for third party units. +cat >> ${PKG_CFG_PATH} <MaxLevel then + Message(option_too_many_cfg_files); ++ if not ParaIncludeCfgPath.FindFile(fileName,true,ConfigFile) then ++ ConfigFile := ExpandFileName(filename); + { Maybe It's Directory ?} //Jaro Change: +- if PathExists(filename,false) then ++ if PathExists(ConfigFile,false) then + begin + Message1(option_config_is_dir,filename); + exit; + end; + { open file } + Message1(option_using_file,filename); +- assign(f,ExpandFileName(filename)); ++ oldfilemode:=filemode; ++ filemode:=0; ++ assign(f,ConfigFile); + {$I-} + reset(f); + {$I+} ++ filemode:=oldfilemode; + if ioresult<>0 then + begin + Message1(option_unable_open_file,filename); +@@ -2147,6 +2155,7 @@ + tmp:= GetName(opts); + if tmp <> '' then + def_system_macro(tmp); ++ Option_read:=true; + end + else + if (s='UNDEF') then +@@ -2155,18 +2164,29 @@ + tmp:= GetName(opts); + if tmp <> '' then + undef_system_macro(tmp); ++ Option_read:=true; + end + else + if (s='WRITE') then + begin + Delete(opts,1,1); + WriteLn(opts); ++ Option_read:=true; + end + else + if (s='INCLUDE') then + begin + Delete(opts,1,1); + Interpret_file(opts); ++ Option_read:=true; ++ end ++ else ++ if (s='CFGDIR') then ++ begin ++ Delete(opts,1,1); ++ DefaultReplacements(opts); ++ ParaIncludeCfgPath.AddPath(opts,false); ++ Option_read:=true; + end; + end; + end +@@ -2514,6 +2534,7 @@ + OptCPUSetExplicitly:=false; + FileLevel:=0; + Quickinfo:=''; ++ ParaIncludeCfgPath:=TSearchPathList.Create; + ParaIncludePath:=TSearchPathList.Create; + ParaObjectPath:=TSearchPathList.Create; + ParaUnitPath:=TSearchPathList.Create; +@@ -2526,6 +2547,7 @@ + + destructor TOption.destroy; + begin ++ ParaIncludeCfgPath.Free; + ParaIncludePath.Free; + ParaObjectPath.Free; + ParaUnitPath.Free; diff -Nru fpc-2.6.2/debian/patches/add-ppc64-support.diff fpc-2.6.2/debian/patches/add-ppc64-support.diff --- fpc-2.6.2/debian/patches/add-ppc64-support.diff 1970-01-01 00:00:00.000000000 +0000 +++ fpc-2.6.2/debian/patches/add-ppc64-support.diff 2013-07-23 18:46:14.000000000 +0000 @@ -0,0 +1,41 @@ +This patch adds man file for the ppcppc64 compiler for ppc64 architecture. + +diff --git a/install/man/man1/ppcppc64.1 b/install/man/man1/ppcppc64.1 +new file mode 100644 +index 0000000..05a97d2 +--- /dev/null ++++ b/install/man/man1/ppcppc64.1 +@@ -0,0 +1,33 @@ ++.TH ppcppc64 1 "30 may 1999" "Free Pascal" "Free Pascal Compiler" ++.SH NAME ++ppcppc64 \- Free Pascal Compiler (FPC) binary, name derived ++from Portable Pascal Compiler ++ ++.SH SYNOPSIS ++ ++.B "ppcppc64 [options] [sourcefile]" ++.BR ++ ++.SH DESCRIPTION ++This binary is the back-end binary of the ++.I Free Pascal Compiler (FPC) ++which is a ++.I Turbo Pascal ++and ++.I Delphi (7.0) ++compatible standalone (non GCC frontend) multitarget Pascal compiler. ++ ++This binary should not be called directly, instead the ++.B fpc ++program should be used instead. ++It will choose the right back-end for compiling units for the requested platforms. ++ ++.SH OPTIONS ++ ++For a complete list of all supported command-line options, see the ++.BR fpc (1) ++manual page. ++ ++.SH SEE ALSO ++.BR fpc (1) ++ diff -Nru fpc-2.6.2/debian/patches/fix-doc-build-with-fpdoc-2.6.0.diff fpc-2.6.2/debian/patches/fix-doc-build-with-fpdoc-2.6.0.diff --- fpc-2.6.2/debian/patches/fix-doc-build-with-fpdoc-2.6.0.diff 2013-05-30 20:11:34.000000000 +0000 +++ fpc-2.6.2/debian/patches/fix-doc-build-with-fpdoc-2.6.0.diff 2013-07-23 19:54:39.000000000 +0000 @@ -12,8 +12,8 @@ @@ -0,0 +1,13 @@ +diff --git a/fpcsrc/rtl/linux/oldlinux.pp b/fpcsrc/rtl/linux/oldlinux.pp +index d006856..dc92266 100644 -+--- ../fpcsrc/rtl/linux/oldlinux.pp -++++ ../fpcsrc/rtl/linux/oldlinux.pp ++--- fpcsrc/rtl/linux/oldlinux.pp +++++ fpcsrc/rtl/linux/oldlinux.pp +@@ -12,7 +12,7 @@ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + @@ -29,9 +29,9 @@ ####################################################################### # Targets to force using a specific tool. hevea: -+ patch -p0 -i fix-doc-build-with-fpdoc-2.6.0.diff ++ patch -p0 -d .. < fix-doc-build-with-fpdoc-2.6.0.diff $(MAKE) html USEHEVEA=1 -+ patch -p0 -R -i fix-doc-build-with-fpdoc-2.6.0.diff ++ patch -p0 -d .. -R < fix-doc-build-with-fpdoc-2.6.0.diff l2h: $(MAKE) html USEL2H=1 4ht: diff -Nru fpc-2.6.2/debian/patches/series fpc-2.6.2/debian/patches/series --- fpc-2.6.2/debian/patches/series 2013-05-30 20:25:39.000000000 +0000 +++ fpc-2.6.2/debian/patches/series 2013-07-24 00:38:15.000000000 +0000 @@ -8,3 +8,5 @@ fix-spell-errors.patch rename-instantfpc-to-ifpc.patch armhf-build-with-2.6.0.diff +add-a-new-directive-CFGDIR-to-configuration-file.patch +use-bfd-explicitly.diff diff -Nru fpc-2.6.2/debian/patches/use-bfd-explicitly.diff fpc-2.6.2/debian/patches/use-bfd-explicitly.diff --- fpc-2.6.2/debian/patches/use-bfd-explicitly.diff 1970-01-01 00:00:00.000000000 +0000 +++ fpc-2.6.2/debian/patches/use-bfd-explicitly.diff 2013-07-24 00:40:01.000000000 +0000 @@ -0,0 +1,32 @@ +Description: Use ld.bfd explicitly + Freepascal is broken with ld.gold, previously we conflicted with binutils-gold + but that makes us uninstallable with the new binutils. + + So instead we take the approach of patching fpc to use ld.bfd directly +Author: Peter Michael Green +Bug-Debian: http://bugs.debian.org/620815 +Bug-Debian: http://bugs.debian.org/624525 +Bug-Debian: http://bugs.debian.org/717651 + +Index: fpc-2.6.2/fpcsrc/compiler/systems/t_linux.pas +=================================================================== +--- fpc-2.6.2.orig/fpcsrc/compiler/systems/t_linux.pas 2013-07-23 21:41:40.000000000 +0000 ++++ fpc-2.6.2/fpcsrc/compiler/systems/t_linux.pas 2013-07-24 00:38:25.000000000 +0000 +@@ -1031,7 +1031,7 @@ + if HasExports then + cmdstr:=cmdstr+' -E'; + +- success:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,false); ++ success:=DoExec(FindUtil(utilsprefix+BinStr)+'.bfd',CmdStr,true,false); + + { Create external .dbg file with debuginfo } + if success and (cs_link_separate_dbg_file in current_settings.globalswitches) then +@@ -1086,7 +1090,7 @@ + Replace(cmdstr,'$INIT',InitStr); + Replace(cmdstr,'$FINI',FiniStr); + Replace(cmdstr,'$SONAME',SoNameStr); +- success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false); ++ success:=DoExec(FindUtil(utilsprefix+binstr)+'.bfd',cmdstr,true,false); + + { Strip the library ? } + if success and (cs_link_strip in current_settings.globalswitches) then diff -Nru fpc-2.6.2/debian/rules fpc-2.6.2/debian/rules --- fpc-2.6.2/debian/rules 2013-05-30 20:25:39.000000000 +0000 +++ fpc-2.6.2/debian/rules 2013-07-23 18:46:14.000000000 +0000 @@ -98,7 +98,9 @@ NEWPP=$(BUILD_DIR)/fpcsrc/compiler/$(PPNEW) NEWFPDOC=$(BUILD_DIR)/fpcsrc/utils/fpdoc/fpdoc # Set default compilation options -BUILDOPTS=PP=$(NEWPP) +DEB_BUILD_FPC_OPT=debian/deb-build-fpc.cfg +DEB_HOST_FPC_OPT=debian/deb-host-fpc.cfg +BUILDOPTS=PP=$(NEWPP) OPT='@${CURDIR}/${DEB_HOST_FPC_OPT}' ifdef CROSSOPT BUILDOPTS+= CROSSOPT=${CROSSOPT} endif @@ -111,20 +113,20 @@ ifeq ($(CPU_TARGET),arm) DEBIANARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) ifeq ($(DEBIANARCH),arm) - CYCLEOPTS := OPT='-dFPC_OARM' + CYCLEOPTS:=OPT='@${CURDIR}/${DEB_HOST_FPC_OPT} -dFPC_OARM' else - CYCLEOPTS := OPT='-dFPC_$(DEBIANARCH)' + CYCLEOPTS:=OPT='@${CURDIR}/${DEB_HOST_FPC_OPT} -dFPC_$(DEBIANARCH)' endif else - CYCLEOPTS= + CYCLEOPTS:=OPT='@${CURDIR}/${DEB_HOST_FPC_OPT}' endif DEB_HOST_MULTIARCH ?=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_BUILD_MULTIARCH ?=$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH) -#FIXME: this won't work for cross-building. -FPMAKEBUILDOPTS := 'FPCFPMAKE=$(PPNEW) -Fl/usr/lib/$(DEB_BUILD_MULTIARCH)' +FPMAKE_BUILDOPTS=FPMAKE_SKIP_CONFIG='-n @${CURDIR}/${DEB_BUILD_FPC_OPT}' +LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS | sed -e 's/-Wl,//g' -e 's/,/ /g') #export DH_VERBOSE=1 @@ -208,7 +210,7 @@ touch configure-stamp build-arch: debian-files configure build-arch-stamp -build-arch-stamp: +build-arch-stamp: ${DEB_BUILD_FPC_OPT} ${DEB_HOST_FPC_OPT} @echo "--- Building" dh_testdir # First make a new Compiler using a make cycle @@ -216,9 +218,9 @@ # Then build RTL using new compiler $(MAKE) -C fpcsrc rtl_clean rtl_smart $(BUILDOPTS) # Finally build packages and tools using new compiler and new RTL - $(MAKE) -C fpcsrc packages_smart $(BUILDOPTS) $(FPMAKEBUILDOPTS) + $(MAKE) -C fpcsrc packages_smart ${BUILDOPTS} ${FPMAKE_BUILDOPTS} $(MAKE) -C fpcsrc ide_all $(BUILDOPTS) - $(MAKE) -C fpcsrc utils_all $(BUILDOPTS) 'OPT=-Fl/usr/lib/$(DEB_HOST_MULTIARCH)' + $(MAKE) -C fpcsrc utils_all ${BUILDOPTS} touch build-arch-stamp install-arch: build-arch install-arch-stamp @@ -410,8 +412,18 @@ DEB_SUBST_TARGET=${FPCTARGET} \ $< --gen-control $@.in -fpcsrc/utils/fpcm/fpcmake:fpcsrc/utils/fpcm/Makefile - ${MAKE} -C ${@D} +fpcsrc/utils/fpcm/fpcmake:fpcsrc/utils/fpcm/Makefile ${DEB_BUILD_FPC_OPT} + ${MAKE} -C ${@D} OPT=@${CURDIR}/${DEB_BUILD_FPC_OPT} fpcsrc/utils/fpcm/Makefile:fpcsrc/utils/fpcm/Makefile.fpc fpcmake -Tall -q $< + +${DEB_BUILD_FPC_OPT}: + echo '# FPC configuration file for build system tools' > $@ + echo '-k${LDFLAGS}' >> $@ + echo '-Fl/usr/lib/${DEB_BUILD_MULTIARCH}' >> $@ + +${DEB_HOST_FPC_OPT}: + echo '# FPC configuration file for host system applications' > $@ + echo '-k${LDFLAGS}' >> $@ + echo '-Fl/usr/lib/${DEB_HOST_MULTIARCH}' >> $@