diff -pruN 3.2.0.0-3/configure.ac 3.2.0.0-3ubuntu1/configure.ac
--- 3.2.0.0-3/configure.ac	2013-05-08 17:09:13.000000000 +0000
+++ 3.2.0.0-3ubuntu1/configure.ac	2014-04-16 11:07:22.000000000 +0000
@@ -86,7 +86,7 @@ LDFLAGS="$llvm_ldflags $LDFLAGS $TARGET_
 
 llvm_extra_ghci_libs=""
 
-AC_SEARCH_LIBS([LLVMModuleCreateWithName],[LLVM-2.7 LLVM-2.8 LLVM-2.9 LLVM-3.0 LLVM-3.1 LLVM-3.2]) 
+AC_SEARCH_LIBS([LLVMModuleCreateWithName],[LLVM-2.7 LLVM-2.8 LLVM-2.9 LLVM-3.0 LLVM-3.1 LLVM-3.2 LLVM-3.3]) 
 if test "$ac_cv_search_LLVMModuleCreateWithName" = "no"; then
    llvm_all_libs="`$llvm_config --libs all`"
 else
diff -pruN 3.2.0.0-3/debian/changelog 3.2.0.0-3ubuntu1/debian/changelog
--- 3.2.0.0-3/debian/changelog	2014-01-27 17:32:21.000000000 +0000
+++ 3.2.0.0-3ubuntu1/debian/changelog	2014-04-16 09:52:25.000000000 +0000
@@ -1,3 +1,12 @@
+haskell-llvm-base (3.2.0.0-3ubuntu1) trusty; urgency=medium
+
+  * Add LLVM 3.3 support.
+  * Use dh-autoreconf to help apply this change.
+  * Build-depend/depend on llvm-3.3-dev and force its use; the default
+    (llvm-3.4) is not supported yet (LP: #1278106).
+
+ -- Colin Watson <cjwatson@ubuntu.com>  Wed, 16 Apr 2014 10:52:25 +0100
+
 haskell-llvm-base (3.2.0.0-3) unstable; urgency=low
 
   * Adjust watch file to new hackage layout
diff -pruN 3.2.0.0-3/debian/control 3.2.0.0-3ubuntu1/debian/control
--- 3.2.0.0-3/debian/control	2013-05-25 21:42:58.000000000 +0000
+++ 3.2.0.0-3ubuntu1/debian/control	2014-04-15 23:15:22.000000000 +0000
@@ -1,14 +1,16 @@
 Source: haskell-llvm-base
 Section: haskell
 Priority: extra
-Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
 Uploaders: Joachim Breitner <nomeata@debian.org>
 Build-Depends: debhelper (>= 9)
   , cdbs
+  , dh-autoreconf
   , haskell-devscripts (>= 0.8.15)
   , ghc
   , ghc-prof
-  , llvm-dev
+  , llvm-3.3-dev
   , libghc-mtl-dev
   , libghc-mtl-prof
 Build-Depends-Indep: ghc-doc
@@ -23,7 +25,7 @@ Architecture: any
 Depends: ${haskell:Depends}
   , ${shlibs:Depends}
   , ${misc:Depends}
-  , llvm-dev
+  , llvm-3.3-dev
 Recommends: ${haskell:Recommends}
 Suggests: ${haskell:Suggests}
 Provides: ${haskell:Provides}
diff -pruN 3.2.0.0-3/debian/patches/llvm-3.3.patch 3.2.0.0-3ubuntu1/debian/patches/llvm-3.3.patch
--- 3.2.0.0-3/debian/patches/llvm-3.3.patch	1970-01-01 00:00:00.000000000 +0000
+++ 3.2.0.0-3ubuntu1/debian/patches/llvm-3.3.patch	2014-04-16 09:51:40.000000000 +0000
@@ -0,0 +1,18 @@
+Description: Add LLVM 3.3 support
+Author: Colin Watson <cjwatson@ubuntu.com>
+Forwarded: no
+Last-Update: 2014-04-16
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -86,7 +86,7 @@
+ 
+ llvm_extra_ghci_libs=""
+ 
+-AC_SEARCH_LIBS([LLVMModuleCreateWithName],[LLVM-2.7 LLVM-2.8 LLVM-2.9 LLVM-3.0 LLVM-3.1 LLVM-3.2]) 
++AC_SEARCH_LIBS([LLVMModuleCreateWithName],[LLVM-2.7 LLVM-2.8 LLVM-2.9 LLVM-3.0 LLVM-3.1 LLVM-3.2 LLVM-3.3]) 
+ if test "$ac_cv_search_LLVMModuleCreateWithName" = "no"; then
+    llvm_all_libs="`$llvm_config --libs all`"
+ else
diff -pruN 3.2.0.0-3/debian/patches/series 3.2.0.0-3ubuntu1/debian/patches/series
--- 3.2.0.0-3/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ 3.2.0.0-3ubuntu1/debian/patches/series	2014-04-16 09:44:29.000000000 +0000
@@ -0,0 +1 @@
+llvm-3.3.patch
diff -pruN 3.2.0.0-3/debian/rules 3.2.0.0-3ubuntu1/debian/rules
--- 3.2.0.0-3/debian/rules	2012-10-13 11:34:00.000000000 +0000
+++ 3.2.0.0-3ubuntu1/debian/rules	2014-04-15 23:52:26.000000000 +0000
@@ -2,3 +2,7 @@
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/hlibrary.mk
+include /usr/share/cdbs/1/rules/autoreconf.mk
+
+DEB_SETUP_GHC_CONFIGURE_ARGS := \
+	--configure-option=--with-llvm-prefix=/usr/lib/llvm-3.3
diff -pruN 3.2.0.0-3/.pc/applied-patches 3.2.0.0-3ubuntu1/.pc/applied-patches
--- 3.2.0.0-3/.pc/applied-patches	1970-01-01 00:00:00.000000000 +0000
+++ 3.2.0.0-3ubuntu1/.pc/applied-patches	2014-04-16 11:07:22.629205659 +0000
@@ -0,0 +1 @@
+llvm-3.3.patch
diff -pruN 3.2.0.0-3/.pc/llvm-3.3.patch/configure.ac 3.2.0.0-3ubuntu1/.pc/llvm-3.3.patch/configure.ac
--- 3.2.0.0-3/.pc/llvm-3.3.patch/configure.ac	1970-01-01 00:00:00.000000000 +0000
+++ 3.2.0.0-3ubuntu1/.pc/llvm-3.3.patch/configure.ac	2013-05-08 17:09:13.000000000 +0000
@@ -0,0 +1,144 @@
+AC_INIT([Haskell LLVM FFI bindings], [3.2.0.0], [bos@serpentine.com], [llvm-base])
+
+AC_CONFIG_SRCDIR([LLVM/FFI/Core.hsc])
+
+AC_CONFIG_FILES([llvm-base.buildinfo])
+
+AC_CONFIG_HEADERS([include/hs_llvm_config.h])
+
+AC_PROG_CXX
+
+AC_LANG(C++)
+
+AC_ARG_WITH(compiler,
+  [AS_HELP_STRING([--with-compiler],
+    [use the given Haskell compiler])],
+  compiler="$withval",
+  compiler=ghc)dnl
+
+AC_ARG_WITH(llvm_prefix,
+  [AS_HELP_STRING([--with-llvm-prefix],
+    [use the version of LLVM at the given location])],
+  llvm_prefix="$withval",
+  llvm_prefix="$prefix")dnl
+
+AC_ARG_WITH(llvm_bindir,
+  [AS_HELP_STRING([--with-llvm-bindir],
+    [use LLVM binaries at the given location])],
+  llvm_bindir="$withval",
+  llvm_bindir="$llvm_prefix/bin")dnl
+
+AC_PATH_PROGS(llvm_config, [llvm-config],
+  [AC_MSG_ERROR(could not find llvm-config in $llvm_bindir)],
+  ["$llvm_bindir:$PATH"])
+  
+dnl * Choose target platform
+dnl
+dnl We don't use the standard autoconf macros for this, but instead
+dnl ask GHC what platform it is for.  Why?  We need to generate a library
+dnl matching the compiler.
+dnl NB: This code is from GHC's configure (where the corresponding code for
+dnl guessing host and build variables can be found, too)
+
+dnl Guess target platform if necessary.
+m4_divert_once([HELP_CANON],
+[[
+System types:
+  --target=TARGET   configure for building compilers for TARGET [guessed]]])dnl
+
+if test "$target" = ""
+then
+    if test "${compiler}" != ""
+    then
+        target=`${compiler} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'`
+        echo "Target platform inferred as: $target"
+    else
+        echo "Can't work out target platform"
+        exit 1
+    fi
+fi
+
+dnl Determine target-specific options
+dnl This is important as Snow Leopard (Mac OS X 10.6) defaults to generating
+dnl 64-bit code.
+case $target in
+i386-apple-darwin)
+    TARGET_CPPFLAGS="-m32"
+    TAGRET_LDFLAGS="-m32"
+    ;;
+x86_64-apple-darwin)
+    TARGET_CPPFLAGS="-m64"
+    TAGRET_LDFLAGS="-m64"
+    ;;
+esac
+
+llvm_version="`$llvm_config --version`"
+AC_MSG_RESULT(found LLVM version $llvm_version)
+llvm_cppflags="`$llvm_config --cppflags`"
+llvm_includedir="`$llvm_config --includedir`"
+llvm_ldflags="`$llvm_config --ldflags`"
+llvm_cflags="`$llvm_config --cflags` `$llvm_config --cxxflags`"
+llvm_all_libs="`$llvm_config --libs all`"
+llvm_target="`$llvm_config --libs engine | sed 's/.*LLVM\(.[[^ ]]*\)CodeGen.*/\1/'`"
+
+CPPFLAGS="$llvm_cppflags $CPPFLAGS $TARGET_CPPFLAGS"
+LDFLAGS="$llvm_ldflags $LDFLAGS $TARGET_LDFLAGS"
+
+llvm_extra_ghci_libs=""
+
+AC_SEARCH_LIBS([LLVMModuleCreateWithName],[LLVM-2.7 LLVM-2.8 LLVM-2.9 LLVM-3.0 LLVM-3.1 LLVM-3.2]) 
+if test "$ac_cv_search_LLVMModuleCreateWithName" = "no"; then
+   llvm_all_libs="`$llvm_config --libs all`"
+else
+   llvm_extra_ghci_libs="LLVM-$llvm_version"
+   llvm_all_libs="$LIBS"
+fi
+
+dnl We need to separate libraries that need to be linked from other linker options.
+llvm_extra_libs=""
+llvm_extra_libdirs=""
+llvm_ldoptions=""
+for opt in $llvm_all_libs $llvm_ldflags; do
+  case $opt in
+    -l*) llvm_extra_libs="$llvm_extra_libs `echo $opt | sed 's/^-l//'`";;
+    -L*) llvm_extra_libdirs="$llvm_extra_libdirs `echo $opt | sed 's/^-L//'`";;
+    *)   llvm_ldoptions="$llvm_ldoptions $opt";;
+  esac
+done
+
+AC_CHECK_HEADERS([llvm-c/Core.h], [],
+  [AC_MSG_ERROR(could not find LLVM C bindings)])
+
+AC_CHECK_HEADERS([llvm/ADT/StringRef.h])
+AC_CHECK_HEADERS([llvm/Support/DynamicLibrary.h], [], [],
+[#ifdef HAVE_LLVM_ADT_STRINGREF_H
+# include <llvm/ADT/StringRef.h>
+#endif])
+
+save_LIBS="$LIBS"
+LIBS="-lLLVMSupport -lpthread -ldl $LIBS"
+
+AC_CHECK_LIB(LLVMCore, LLVMModuleCreateWithName, [], [])
+if test "$ac_cv_lib_LLVMCore_LLVMModuleCreateWithName" = "no"; then
+  unset ac_cv_lib_LLVMCore_LLVMModuleCreateWithName
+  LIBS="-lLLVMSupport $save_LIBS"
+  AC_CHECK_LIB(LLVMCore, LLVMModuleCreateWithName, [],
+    [AC_MSG_ERROR(could not find LLVM C bindings)])
+fi
+
+llvm_num_version="`echo $llvm_version | sed 's/svn$//' | tr . 0`"
+AC_DEFINE_UNQUOTED([HS_LLVM_VERSION], [$llvm_num_version],
+  [Define to the version of LLVM, e.g. 209 for 2.9.])
+
+AC_SUBST([llvm_num_version])
+AC_SUBST([llvm_version])
+AC_SUBST([llvm_cppflags])
+AC_SUBST([llvm_cflags])
+AC_SUBST([llvm_extra_libs])
+AC_SUBST([llvm_extra_libdirs])
+AC_SUBST([llvm_extra_ghci_libs])
+AC_SUBST([llvm_target])
+AC_SUBST([llvm_includedir])
+AC_SUBST([llvm_ldoptions])
+
+AC_OUTPUT
