mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
changes needed to successfully build gcc (#83)
* clang doesn't have `-nodefaultrpaths` * try `MachO::FatFile` if `MachO:MachOFile` fails * add explicit comments * use `MachO.open()` * fix fetch.ts for no src pkgs Co-authored-by: Max Howell <mxcl@me.com>
This commit is contained in:
parent
c78878a22f
commit
fc31bb8939
4 changed files with 11 additions and 5 deletions
|
@ -11,8 +11,9 @@ $tea_prefix = ENV['TEA_PREFIX'] || `tea --prefix`.chomp
|
||||||
exe = File.basename($0)
|
exe = File.basename($0)
|
||||||
|
|
||||||
# remove duplicates since this in fact embeds the rpath multiple times
|
# remove duplicates since this in fact embeds the rpath multiple times
|
||||||
|
# and omit -nodefaultrpaths since it is not a valid flag for clang
|
||||||
args = ARGV.map do |arg|
|
args = ARGV.map do |arg|
|
||||||
arg unless arg == "-Wl,-rpath,#$tea_prefix"
|
arg unless arg == "-Wl,-rpath,#$tea_prefix" or arg == "-nodefaultrpaths"
|
||||||
end.compact
|
end.compact
|
||||||
|
|
||||||
# find next example of ourselves
|
# find next example of ourselves
|
||||||
|
|
|
@ -3,7 +3,7 @@ distributable: ~
|
||||||
# FIXME we want the c version eg. c99
|
# FIXME we want the c version eg. c99
|
||||||
# or should that be some kind of option? so you specify you want a cc that support c99
|
# or should that be some kind of option? so you specify you want a cc that support c99
|
||||||
versions:
|
versions:
|
||||||
- 0.1.1
|
- 0.1.2
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
linux:
|
linux:
|
||||||
|
|
|
@ -41,7 +41,7 @@ end
|
||||||
|
|
||||||
class Fixer
|
class Fixer
|
||||||
def initialize(file)
|
def initialize(file)
|
||||||
@file = MachO::MachOFile.new(file)
|
@file = MachO.open(file)
|
||||||
@changed = false
|
@changed = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,12 @@ export async function fetch_src(pkg: Package): Promise<[Path, Path] | undefined>
|
||||||
if (import.meta.main) {
|
if (import.meta.main) {
|
||||||
for await (let pkg of ARGV.pkgs()) {
|
for await (let pkg of ARGV.pkgs()) {
|
||||||
pkg = await pantry.resolve(pkg)
|
pkg = await pantry.resolve(pkg)
|
||||||
const rv = await fetch_src(pkg) ?? panic()
|
const rv = await fetch_src(pkg)
|
||||||
|
if (rv) {
|
||||||
|
// a package doesn’t require a source tarball
|
||||||
|
//FIXME is this dumb tho? In theory a package could just be a build script that generates itself
|
||||||
|
// in practice this is rare and pkgs could just specify some dummy tarball
|
||||||
await print(rv.join("\n") + "\n")
|
await print(rv.join("\n") + "\n")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue