add buildroot bin PATH

This commit is contained in:
crazywhalecc 2023-08-21 18:07:52 +08:00 committed by Jerry Ma
parent c8fa767576
commit dfdeab70f1
2 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,7 @@ class LinuxBuilder extends BuilderBase
...$vars, ...$vars,
'CC' => $this->getOption('cc'), 'CC' => $this->getOption('cc'),
'CXX' => $this->getOption('cxx'), 'CXX' => $this->getOption('cxx'),
'PATH' => BUILD_ROOT_PATH . '/bin:' . getenv('PATH'),
]); ]);
// cross-compile does not support yet // cross-compile does not support yet
/*if (php_uname('m') !== $this->arch) { /*if (php_uname('m') !== $this->arch) {
@ -158,6 +159,7 @@ class LinuxBuilder extends BuilderBase
'CXX' => $this->getOption('cxx'), 'CXX' => $this->getOption('cxx'),
'CFLAGS' => $cflags, 'CFLAGS' => $cflags,
'LIBS' => '-ldl -lpthread', 'LIBS' => '-ldl -lpthread',
'PATH' => BUILD_ROOT_PATH . '/bin:' . getenv('PATH'),
]); ]);
SourcePatcher::patchBeforeBuildconf($this); SourcePatcher::patchBeforeBuildconf($this);

View File

@ -53,6 +53,7 @@ class MacOSBuilder extends BuilderBase
'CC' => $this->getOption('cc'), 'CC' => $this->getOption('cc'),
'CXX' => $this->getOption('cxx'), 'CXX' => $this->getOption('cxx'),
'CFLAGS' => "{$this->arch_c_flags} -Wimplicit-function-declaration -Os", 'CFLAGS' => "{$this->arch_c_flags} -Wimplicit-function-declaration -Os",
'PATH' => BUILD_ROOT_PATH . '/bin:' . getenv('PATH'),
]); ]);
// create pkgconfig and include dir (some libs cannot create them automatically) // create pkgconfig and include dir (some libs cannot create them automatically)