| Index: build/config/linux/pkg_config.gni | 
| diff --git a/build/config/linux/pkg_config.gni b/build/config/linux/pkg_config.gni | 
| index f2c7958f119cea632152a419877455b47cca7bd5..004405854b436b67f981a58809633eed2a439483 100644 | 
| --- a/build/config/linux/pkg_config.gni | 
| +++ b/build/config/linux/pkg_config.gni | 
| @@ -65,8 +65,8 @@ if (sysroot != "") { | 
| pkg_config_args = [] | 
| } | 
|  | 
| -# Only use the custom libdir when building with the default toolchain. | 
| -if (current_toolchain == default_toolchain) { | 
| +# Only use the custom libdir when building with the target sysroot. | 
| +if (target_sysroot != "" && sysroot == target_sysroot) { | 
| pkg_config_args += [ | 
| "--system_libdir", | 
| system_libdir, | 
|  |