Added Lazarus IDE for Free Pascal Compiler.
svn path=/nixpkgs/trunk/; revision=11492
This commit is contained in:
parent
14eeb7fb50
commit
2b9c9ab559
@ -5,19 +5,58 @@ rec {
|
||||
sha256 = "11vjn8wn76cq63jam7y5ralq1b12r6cdipf22nsnzw90srb49qkp";
|
||||
};
|
||||
|
||||
buildInputs = [llvm bison flex perl mpfr gmp];
|
||||
configureFlags = [" --enable-llvm=$(ls -d $PWD/../llvm-?.?) "];
|
||||
buildInputs = [llvm bison flex perl libtool];
|
||||
configureFlags = [ " --enable-languages=c,c++ " ];
|
||||
makeFlags = [" -f Makefile "];
|
||||
|
||||
phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
|
||||
phaseNames = [ "doPatch" "preConfigure" "doConfigure"
|
||||
"doMakeInstall" "postInstall"];
|
||||
|
||||
patches = [ ./no-sys-dirs.patch ];
|
||||
|
||||
preConfigure = FullDepEntry (''
|
||||
|
||||
sed -e 's,^LLVMSRCDIR.*,LLVMSRCDIR := dummy,' \
|
||||
-e 's,\$(LLVMSRCDIR)/include,${llvm}/include,g' \
|
||||
-e 's,^LLVMOBJDIR.*,LLVMOBJDIR := dummy,' \
|
||||
-e 's,\$(LLVMOBJDIR)/include,${llvm}/include,g' \
|
||||
-e 's,^LLVMBINPATH.*,LLVMBINPATH = ${llvm}/bin,' \
|
||||
-i gcc/Makefile.in
|
||||
|
||||
cd ..
|
||||
mkdir obj install
|
||||
tar xf ${llvmSrc}
|
||||
cd obj
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
export CPP="gcc -E"
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
|
||||
extraCFlags="-g0 $extraCFlags"
|
||||
extraLDFlags="--strip-debug $extraLDFlags"
|
||||
|
||||
export NIX_EXTRA_CFLAGS=$extraCFlags
|
||||
for i in $extraLDFlags; do
|
||||
export NIX_EXTRA_LDFLAGS="$NIX_EXTRA_LDFLAGS -Wl,$i"
|
||||
done
|
||||
|
||||
'') ["doUnpack" "minInit"];
|
||||
configureCommand = "$(ls ../llvm-gcc*.*.source/configure)";
|
||||
|
||||
postInstall = FullDepEntry (''
|
||||
mv $out/bin/gcc $out/bin/llvm-gcc
|
||||
mv $out/bin/g++ $out/bin/llvm-g++
|
||||
'')["doMakeInstall" "minInit"];
|
||||
|
||||
name = "llvm-gcc42-2.2";
|
||||
meta = {
|
||||
|
139
pkgs/development/compilers/llvm/no-sys-dirs.patch
Normal file
139
pkgs/development/compilers/llvm/no-sys-dirs.patch
Normal file
@ -0,0 +1,139 @@
|
||||
diff -rc gcc-4.2.0-orig/Makefile.in gcc-4.2.0/Makefile.in
|
||||
*** gcc-4.2.0-orig/Makefile.in 2006-12-29 18:47:06.000000000 +0100
|
||||
--- gcc-4.2.0/Makefile.in 2007-05-20 21:06:42.000000000 +0200
|
||||
***************
|
||||
*** 364,369 ****
|
||||
--- 364,377 ----
|
||||
@host_makefile_frag@
|
||||
###
|
||||
|
||||
+ CFLAGS += $(NIX_EXTRA_CFLAGS)
|
||||
+ CPPFLAGS_FOR_TARGET += $(NIX_EXTRA_CFLAGS)
|
||||
+ CXXFLAGS += $(NIX_EXTRA_CFLAGS)
|
||||
+ LDFLAGS += $(NIX_EXTRA_LDFLAGS)
|
||||
+ LDFLAGS_FOR_TARGET += $(NIX_EXTRA_LDFLAGS)
|
||||
+ BOOT_CFLAGS += $(NIX_EXTRA_CFLAGS)
|
||||
+ BOOT_LDFLAGS += $(NIX_EXTRA_LDFLAGS)
|
||||
+
|
||||
# This is the list of directories that may be needed in RPATH_ENVVAR
|
||||
# so that prorgams built for the target machine work.
|
||||
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)
|
||||
diff -rc gcc-4.2.0-orig/gcc/Makefile.in gcc-4.2.0/gcc/Makefile.in
|
||||
*** gcc-4.2.0-orig/gcc/Makefile.in 2007-03-12 05:40:09.000000000 +0100
|
||||
--- gcc-4.2.0/gcc/Makefile.in 2007-05-20 19:35:13.000000000 +0200
|
||||
***************
|
||||
*** 396,402 ****
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
! NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
--- 396,406 ----
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
! # Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
|
||||
! # `fixinc' from fixing header files in /usr/include. However,
|
||||
! # NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
|
||||
! # it to some dummy directory.
|
||||
! NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
***************
|
||||
*** 3066,3072 ****
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
! -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
@TARGET_SYSTEM_ROOT_DEFINE@
|
||||
--- 3070,3076 ----
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
! -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
@TARGET_SYSTEM_ROOT_DEFINE@
|
||||
diff -rc gcc-4.2.0-orig/gcc/cppdefault.c gcc-4.2.0/gcc/cppdefault.c
|
||||
*** gcc-4.2.0-orig/gcc/cppdefault.c 2006-01-20 22:00:03.000000000 +0100
|
||||
--- gcc-4.2.0/gcc/cppdefault.c 2007-05-20 17:16:44.000000000 +0200
|
||||
***************
|
||||
*** 41,46 ****
|
||||
--- 41,50 ----
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+ #undef LOCAL_INCLUDE_DIR
|
||||
+ #undef SYSTEM_INCLUDE_DIR
|
||||
+ #undef STANDARD_INCLUDE_DIR
|
||||
+
|
||||
/* APPLE LOCAL begin mainline 4.3 2006-12-13 CROSS_DIRECTORY_STRUCTURE 4697325 */
|
||||
#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
|
||||
/* APPLE LOCAL end mainline 4.3 2006-12-13 CROSS_DIRECTORY_STRUCTURE 4697325 */
|
||||
diff -rc gcc-4.2.0-orig/gcc/gcc.c gcc-4.2.0/gcc/gcc.c
|
||||
*** gcc-4.2.0-orig/gcc/gcc.c 2007-03-05 21:37:05.000000000 +0100
|
||||
--- gcc-4.2.0/gcc/gcc.c 2007-05-20 17:49:48.000000000 +0200
|
||||
***************
|
||||
*** 1449,1458 ****
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
! #define STANDARD_STARTFILE_PREFIX_1 "/lib/"
|
||||
#endif
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
! #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
|
||||
#endif
|
||||
|
||||
#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */
|
||||
--- 1449,1458 ----
|
||||
/* Default prefixes to attach to command names. */
|
||||
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_1
|
||||
! #define STANDARD_STARTFILE_PREFIX_1 ""
|
||||
#endif
|
||||
#ifndef STANDARD_STARTFILE_PREFIX_2
|
||||
! #define STANDARD_STARTFILE_PREFIX_2 ""
|
||||
#endif
|
||||
|
||||
#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */
|
||||
***************
|
||||
*** 1473,1480 ****
|
||||
#endif
|
||||
|
||||
static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
|
||||
! static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
|
||||
! static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
|
||||
static const char *md_exec_prefix = MD_EXEC_PREFIX;
|
||||
|
||||
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
|
||||
--- 1473,1480 ----
|
||||
#endif
|
||||
|
||||
static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
|
||||
! static const char *const standard_exec_prefix_1 = "/no-such-path/";
|
||||
! static const char *const standard_exec_prefix_2 = "/no-such-path/";
|
||||
static const char *md_exec_prefix = MD_EXEC_PREFIX;
|
||||
|
||||
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
|
||||
diff -rc gcc-4.2.0-orig/ltconfig gcc-4.2.0/ltconfig
|
||||
*** gcc-4.2.0-orig/ltconfig 2007-02-14 18:08:35.000000000 +0100
|
||||
--- gcc-4.2.0/ltconfig 2007-05-20 22:16:24.000000000 +0200
|
||||
***************
|
||||
*** 2322,2327 ****
|
||||
--- 2322,2332 ----
|
||||
# A language-specific compiler.
|
||||
CC=$CC
|
||||
|
||||
+ # Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+ # Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+ # to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+ CC="\$CC $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS"
|
||||
+
|
||||
# Is the compiler the GNU C compiler?
|
||||
with_gcc=$with_gcc
|
||||
|
@ -1200,7 +1200,7 @@ let pkgs = rec {
|
||||
};
|
||||
|
||||
fpc = import ../development/compilers/fpc {
|
||||
inherit fetchurl stdenv gawk;
|
||||
inherit fetchurl stdenv gawk system;
|
||||
};
|
||||
|
||||
flapjax = import ../development/compilers/flapjax {
|
||||
@ -1534,6 +1534,13 @@ let pkgs = rec {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
|
||||
lazarusFun = builderDefsPackage (import ../development/compilers/fpc/lazarus.nix) {
|
||||
inherit fpc makeWrapper;
|
||||
inherit (gtkLibs1x) gtk glib gdkpixbuf;
|
||||
inherit (xlibs) libXi inputproto libX11 xproto libXext xextproto;
|
||||
};
|
||||
lazarus = lazarusFun null;
|
||||
|
||||
llvm = import ../development/compilers/llvm {
|
||||
inherit fetchurl stdenv gcc flex perl libtool;
|
||||
};
|
||||
@ -1541,8 +1548,7 @@ let pkgs = rec {
|
||||
llvmGccFun = builderDefsPackage (import ../development/compilers/llvm/llvm-gcc.nix) {
|
||||
flex=flex2535;
|
||||
bison=bison23;
|
||||
inherit llvm perl mpfr gmp;
|
||||
llvmSrc = llvm.src;
|
||||
inherit llvm perl libtool;
|
||||
};
|
||||
|
||||
llvmGCC =llvmGccFun null;
|
||||
|
Loading…
Reference in New Issue
Block a user