Skip to content
Snippets Groups Projects
Commit 89a9b01c authored by Ben Gamari's avatar Ben Gamari :turtle:
Browse files

Merge branch 'libffi-3.4.6' into 'master'

Update to libffi 3.4.6

See merge request !3
parents 91750f5a 00930c98
No related branches found
No related tags found
1 merge request!3Update to libffi 3.4.6
libffi - Copyright (c) 1996-2012 Anthony Green, Red Hat, Inc and others.
libffi - Copyright (c) 1996-2024 Anthony Green, Red Hat, Inc and others.
See source files for details.
Permission is hereby granted, free of charge, to any person obtaining
......
# libffi tarballs for GHC
This repository contains the source tarballs used to
build [libffi](https://github.com/libffi/libffi/issues/296)
for [GHC](https://ghc.haskell.org/). While in principle this repository should
contain official source tarballs from the libffi project, the
recent [lack of releases](https://github.com/libffi/libffi/issues/296) has meant
that we have had to start packaging our own snapshots.
This repository contains the official source tarballs used to build
[libffi](https://github.com/libffi/libffi) for
[GHC](https://ghc.haskell.org/).
Note that in order to reduce working tree size, this repository contains only
orphan branches. Each branch contains one source tarball. These tarballs and
their branches are generated using the `mk-snapshot.sh` script.
In order to update the `libffi` version built by GHC, first run
`mk-snapshot.sh`, then push the resulting branch to `git.haskell.org`, and
finally update the submodule commit in the `ghc` repository.
In order to update the `libffi` version built by GHC, first land a
merge request to
[`libffi-tarballs`](https://gitlab.haskell.org/ghc/libffi-tarballs),
then update the submodule commit in the `ghc` repository.
File deleted
File added
#!/bin/bash -e
# Create a snapshot of the libffi repository from github, as a workaround for
# the lack of recent releases of libffi (see https://github.com/libffi/libffi/issues/296)
GVERS=3.99999 # see configure.ac / AC_INIT
# make a temporary directory and perform operations in there.
TMPD=$(mktemp -d)
TDIR=$(pwd)
# clone the repository (shallow is sufficient)
git -C ${TMPD} clone --depth 1 https://github.com/bgamari/libffi.git
REPO="${TMPD}/libffi"
# record the revision and create a copy of only the files
# contained in the repository at libffi-<revision>
GHASH=$(git -C ${REPO} rev-parse --short HEAD)
GDATE=$(git -C ${REPO} log -1 --pretty=format:%cd --date=format:%Y%m%d)
SUFFIX="${GVERS}+git${GDATE}+${GHASH}"
# run autogen and generate distribution tarball.
(cd "$REPO" && ./autogen.sh && ./configure && make dist)
# package it up
DISTLIB="libffi-${GVERS}.tar.gz"
FINALLIB="libffi-${SUFFIX}.tar.gz"
mv "$REPO/$DISTLIB" ./$FINALLIB
# create orphan libffi-tarballs branch
git checkout --orphan "libffi-${SUFFIX}"
git add $FINALLIB
cat >README.md <<EOF
# libffi snapshot tarball for GHC
This source snapshot was produced from
[libffi](https://github.com/libffi/libffi) commit
[${GHASH}](https://github.com/libffi/libffi/commit/${GHASH}) for GHC. See the
\`master\` branch of this repository for more information about the rationale
and tools for producing these snapshots.
EOF
git add README.md
git rm --cached mk-snapshot.sh
git commit -m "Snapshot of libffi ${GHASH}"
git checkout -f master
echo "Created branch libffi-${SUFFIX}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment