|
284 | 284 | """,
|
285 | 285 | # Build for our platform
|
286 | 286 | [platform],
|
287 |
| - # Ensure our executable products are built |
288 |
| - Product[LibraryProduct("libfoo", :libfoo)], |
| 287 | + # Ensure our library product is built |
| 288 | + [LibraryProduct("libfoo", :libfoo)], |
289 | 289 | # No dependencies
|
290 | 290 | Dependency[]
|
291 | 291 | )
|
|
317 | 317 | FileSource[],
|
318 | 318 | # Intsall a .dll into lib
|
319 | 319 | raw"""
|
320 |
| - mkdir -p ${prefix}/lib |
| 320 | + mkdir -p "${libdir}" |
321 | 321 | SRC=/usr/share/testsuite/c/dyn_link/libfoo/libfoo.c
|
322 | 322 | cc -o ${libdir}/no_id.${dlext} -shared $SRC
|
323 | 323 | cc -o ${libdir}/abs_id.${dlext} -Wl,-install_name,${libdir}/abs_id.${dlext} -shared $SRC
|
@@ -486,14 +486,14 @@ end
|
486 | 486 | FileSource[],
|
487 | 487 | # Build the library only with the versioned name
|
488 | 488 | raw"""
|
489 |
| - mkdir -p ${prefix}/lib |
490 |
| - cc -o ${prefix}/lib/libfoo.${dlext}.1.0.0 -fPIC -shared /usr/share/testsuite/c/dyn_link/libfoo/libfoo.c |
| 489 | + mkdir -p "${libdir}" |
| 490 | + cc -o "${libdir}/libfoo.${dlext}.1.0.0" -fPIC -shared /usr/share/testsuite/c/dyn_link/libfoo/libfoo.c |
491 | 491 | # Set the soname to a non-existing file
|
492 |
| - patchelf --set-soname libfoo.so ${prefix}/lib/libfoo.${dlext}.1.0.0 |
| 492 | + patchelf --set-soname libfoo.so "${libdir}/libfoo.${dlext}.1.0.0" |
493 | 493 | """,
|
494 | 494 | # Build for Linux
|
495 | 495 | [linux_platform],
|
496 |
| - # Ensure our executable products are built |
| 496 | + # Ensure our library product is built |
497 | 497 | [LibraryProduct("libfoo", :libfoo)],
|
498 | 498 | # No dependencies
|
499 | 499 | Dependency[];
|
|
517 | 517 | end
|
518 | 518 | end
|
519 | 519 |
|
| 520 | +@testset "Auditor - other checks" begin |
| 521 | + mktempdir() do build_path |
| 522 | + @test_logs (:error, r"does not match the hard-float ABI") match_mode=:any begin |
| 523 | + autobuild( |
| 524 | + build_path, |
| 525 | + "hard_float_ABI", |
| 526 | + v"1.0.0", |
| 527 | + # No sources |
| 528 | + FileSource[], |
| 529 | + # Build a library which doesn't link to the standard library and |
| 530 | + # forces the soft-float ABI |
| 531 | + raw""" |
| 532 | + mkdir -p "${libdir}" |
| 533 | + echo 'int _start() { return 0; }' | /opt/${target}/bin/${target}-gcc -nostdlib -shared -mfloat-abi=soft -o "${libdir}/libfoo.${dlext}" -x c - |
| 534 | + """, |
| 535 | + # Build for Linux armv7l hard-float |
| 536 | + [Platform("armv7l", "linux"; call_abi = "eabihf", libc = "glibc")], |
| 537 | + # Ensure our library product is built |
| 538 | + [LibraryProduct("libfoo", :libfoo)], |
| 539 | + # No dependencies |
| 540 | + Dependency[]; |
| 541 | + verbose = true, |
| 542 | + require_license = false |
| 543 | + ) |
| 544 | + end |
| 545 | + end |
| 546 | +end |
| 547 | + |
520 | 548 | @testset "valid_library_path" begin
|
521 | 549 | linux = Platform("x86_64", "linux")
|
522 | 550 | macos = Platform("x86_64", "macos")
|
|
0 commit comments